#27 - Remove Duplicate Numbers
You are given an array of integers. Some elements in the array are duplicates, and you need to remove these duplicates while maintaining the original order of elements.
Example 1
Input
[1, 3, 2, 2, 4, 3, 5, 1]
Output
[1,3,2,4,5]
Example 2
Input
[3, 1, 2, 3, 4, 2, 5, 5, 1]
Output
[3,1,2,4,5]
Last updated