0

someone knows how to look for the three largest numbers of a arrays in java

6th Nov 2018, 10:55 PM
THE GOREM
THE GOREM - avatar
2 Antworten
+ 8
Hi, Welcome to SoloLearn forum!😊 Please, use the search feature before posting as to reduce the number of duplicate threads in this section! https://www.sololearn.com/post/10362/?ref=app https://www.sololearn.com/Discuss/1316935/?ref=app An useful code for any new user here!;) https://code.sololearn.com/WvG0MJq2dQ6y/
6th Nov 2018, 11:08 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 2
THE GOREM, You can sort the array so the smallest number will comes first and the largest at last in the array. Get the last 3 numbers and they will be the 3 largest of the array. Or, sort and reverse the string so the largest will comes as first in the array. Get the first 3 numbers and they will be the 3 largest of the array.👍
6th Nov 2018, 11:21 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar