Write a method to remove duplicate elements from an array without using uniq.
MediumProblem Statement
Write a method to remove duplicate elements from an array without using uniq.
Sample Input
[1, 2, 2, 3, 4, 4, 5]
Sample Output
[1, 2, 3, 4, 5]
Limits
Time: 2s · Memory: 256 MB