| Topic | Difficulty | Companies |
|---|---|---|
| Hash Table | MEDIUM | Amazon Google Microsoft |
An unsorted array arr consisting of n elements is given, write a program to remove all the duplicate elements from the array.
Problem Note
Example 1
Input: arr[] = [2, 3, 1, 9, 3, 1, 3, 9]
Output: [2, 3, 1, 9]
Explanation: [1, 3, 9] appear more than one time.
Example 2
Input: arr[] = [1, 1, 2, 3, 4]
Output: [1, 2, 3, 4]
Explanation: [1] appear more than one time.