An array has pairs of positive integers in random order. One integer is accidently changed to -1. Return the array to its original state.
O(n) time.
O(1) space.
Subscribe to:
Post Comments (Atom)
Brain-teasers and technical questions that interviewers use to challenge your logic and problem solving skills.
No comments:
Post a Comment