You are viewing a single comment's thread. Return to all comments →
Set<Integer> set = new HashSet<>(a); Iterator<Integer> it = set.iterator(); int result = 0; while(it.hasNext()) { int next = it.next(); int fr = Collections.frequency(a, next); if (fr == 1) { result = next; break; } } return result;
Seems like cookies are disabled on this browser, please enable them to open this website
Lonely Integer
You are viewing a single comment's thread. Return to all comments →