Find the elements which are present more than once (in an array).
Asked in the Coding test stage. Solved with a map in C++.
Implement find_duplicates(arr). Return a list containing each distinct repeated value once, ordered by its first appearance in arr.
arr is a list of integers. Return a list of integers.
def find_duplicates(arr):