Duplicates
Write a metod that will remove the duplicates from a given list of integers. I.e. for the given list: [1, 2, 1, 5, 5, 7]
it should return [1, 2, 5, 7]
Note: The original array should be left intact.
Hint:
The method to calculate the frequencies can be useful here.