tag:blogger.com,1999:blog-8712770457197348465.post6822352210991667359..comments2024-03-28T01:04:16.249-07:00Comments on Javarevisited: How to find the largest and smallest number in given Array in Java? Example Tutorialjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8712770457197348465.post-46553089967673041502017-03-08T16:14:10.792-08:002017-03-08T16:14:10.792-08:00Why don' use Stream API ?Why don' use Stream API ?Anonymoushttps://www.blogger.com/profile/10938368979046963316noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-29323986707236390502017-03-08T04:21:04.398-08:002017-03-08T04:21:04.398-08:00Hi Javin ,
Just to simplify tell me your views ...Hi Javin , <br /><br />Just to simplify tell me your views on the below approach <br /><br />1,3,2,5<br /><br />for this finding min,max will take 6 comparisons<br /><br />but divide them<br /><br />1,3 ---> will give min 1 and max 3 in one comparison 2,5 ---> will give min 2 and max 5 in one comparison<br /><br />now we can compare two mins (1,2) --> will give the final min as 1 ( one SARAL SAXENAhttps://www.blogger.com/profile/01084233786047386880noreply@blogger.com