rjxxl1 must be new here...
No ratings yet!
Microsoft Interview Question - Count it Out
I think this question might have a flaw in it. If the array has 99 unique numbers, but the number can be anything between 0 and 100, then there are TWO numbers missing, because there are 101 unique numbers between 0 and 100 (0 included). So adding them up and subtracting from 5,050 will give you the sum of the two numbers that are missing.
The question either is supposed to have unique digits between 1 and 100, or the array has 100 unique numbers.context