Company: Infoedge
Difficulty: medium
Remove Duplicates from Array Problem Description Ravi went to the market to buy an array A of N integers. But the shopkeeper was cunning. The array he gave to Ravi was containing some elements more than once, which Ravi didn't want to be the case. So, he asks you to help him. Write a program that would remove all the repeated elements from Ravi's array. Input Format The first line of input contains a single integer N. Next N lines of input contain an integer each, the elements of the Array. Output Format Return the new array containing no repeated elements. The new array should be strictly increasing. Examples Example 1: Input: 5 1 2 1 3 4 Output: 1 2 3 4 Explanation: The input array contains 5 elements: [1, 2, 1, 3, 4] . After removing duplicate elements and sorting the remaining unique elements in strictly increasing order, the result is [1, 2, 3, 4] . Constraints No specific constraints are provided in the problem statement.