You are viewing a single comment's thread. Return to all comments →
No need to sort
int size = a.size(); for (int i=0; i<size && k>0; i++) { if (a[i]<=0) { k--; } } if (k==0) return "NO"; else 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 →
No need to sort