Missinginteger
Test description
Solution:
For this one, despite its easiness, I took almost 50 mins to think about the solution. I kept trying to use TreeSet or HashSet. Finally I've got the answer and I scored pretty ok. There was just one exception that I could not even think of, which was the set of numbers comprised of all negative numbers.
For this one, despite its easiness, I took almost 50 mins to think about the solution. I kept trying to use TreeSet or HashSet. Finally I've got the answer and I scored pretty ok. There was just one exception that I could not even think of, which was the set of numbers comprised of all negative numbers.
and so after just adding one line of:
if( uniquekeys.isempty() ) return 1;
I was able to get 100%.