Implement solve(arr) that returns a new array containing only thefirst occurrence of each element, preserving the original order.
solve(arr)
Examples
solve([1,2,1,3,2])
[1,2,3]
solve([])
[]
solve(['a','b','a'])
['a','b']
Constraints
Sample tests