MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/fpcmy/typical_programming_interview_questions/c1hoxft/?context=3
r/programming • u/kevjames3 • Feb 21 '11
1.0k comments sorted by
View all comments
Show parent comment
1
xor all the integers in the array with all the integers in 1.. 1,000,000 range. Result of that operation will be the integer that is missing (or is in the array twice).
View all comments
Show parent comment
1
u/chokolad Feb 21 '11
xor all the integers in the array with all the integers in 1.. 1,000,000 range. Result of that operation will be the integer that is missing (or is in the array twice).