Deleting duplicate numbers from a sorted array
Given a sorted array of numbers, how to delete the duplicate numbers in it? We have to write a function to modify the existing array without using any extra space and return the new length. The solution to this problem is similar to that of “Deleting all instances of a particular number from a given…