You are viewing a single comment's thread. Return to all comments →
Don't make want to make code is too coplicated to see for the beginers.
//Just on default package - collections
Collections.sort(arr); long Max=0L; long Min=0L; for(int A =0;A-1;B--){ if(B!=arr.size()-1){ Min=Min+arr.get(B); } } System.out.print(Min + " " +Max);
Seems like cookies are disabled on this browser, please enable them to open this website
Mini-Max Sum
You are viewing a single comment's thread. Return to all comments →
Don't make want to make code is too coplicated to see for the beginers.
//Just on default package - collections
Collections.sort(arr); long Max=0L; long Min=0L; for(int A =0;A-1;B--){ if(B!=arr.size()-1){ Min=Min+arr.get(B); } } System.out.print(Min + " " +Max);