A simple one today.
A set of unique integers 1..N are randomly placed in an array of length N-1. Determine which integer is missing.
Try and come up with multiple solutions improving upon space/time complexity. You should be able to do this with constant space and a single pass.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment