You are viewing a single comment's thread. Return to all comments →
JAVA 8
int x = 0; int count = 0; int result = 0; for (int i = 0; i < a.size(); i++) { x = a.get(i); for (int j = 0; j < a.size(); j++) { if (x + 1 == a.get(j) || x == a.get(j)) count++; if (count > result) result = count; } count = 0; } return result;
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Numbers
You are viewing a single comment's thread. Return to all comments →
JAVA 8