Onsite #7 Remove duplicates from a sorted array with O(1) space
Anonimo
Array is sorted that is the key here, We need a variable to hold current insert position in an array. Start iterate over an array and compare current and next elements. when they are not matching put it at insert position and then increment insert position and keep iterating over an array