Given an array, double elements if arr[i] == arr[i+1] and set the next element to zero. After processing, move all zeros to the end of the array while maintaining the relative order of non-zero…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.