Given an array of integers containing elements from 1 to n, where some elements appear twice and others appear once, find all the duplicates in O(n) time and using constant extra space.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.