You are viewing a single comment's thread. Return to all comments →
hey!! for Java 8 my solution was this and I´m very happy with it.
List<Integer> response = new ArrayList<>(); do { response.add(arr.size()); int min =Collections.min(arr); arr.removeIf(n-> (n == min)); } while (arr.size()>=1); return response;
Seems like cookies are disabled on this browser, please enable them to open this website
Cut the sticks
You are viewing a single comment's thread. Return to all comments →
hey!! for Java 8 my solution was this and I´m very happy with it.