Given an array of integers, replace every second occurrence of any duplicate element with 0. For example, if the array is [1, 2, 1, 3, 2, 1], the second '1' and second '2' are replaced.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.