+ 2
How do you find the missing number in a given integer array of 1-100
Arrays
3 Réponses
+ 3
If you sort the array, you can count from 1 and the missing value is found, when the count does not match the current array element.
0
you can do something like this:
https://code.sololearn.com/csq7fV0F92Jj/?ref=app
https://code.sololearn.com/c3eh3fUEwy5c/?ref=app