You are viewing a single comment's thread. Return to all comments →
java 8
public static String angryProfessor(int k, List<Integer> a) { Collections.sort(a); int presentersCount =0; for(int i = 0; i < a.size(); i++){ if(a.get(i) <= 0 && a.get(i) <1 ){ presentersCount++; } } if(presentersCount >= k){ return "NO"; } return "YES"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Angry Professor
You are viewing a single comment's thread. Return to all comments →
java 8