Sankey Solutions interview question

Oops concept, remove duplicate elements from the array