Essa empresa é sua?
Given an array of songs, write an algorithm that returns the first stale (aka repeated) song.
Sigiloso
(In Swift) I wrote a function that takes an array as parameter and returns an optional String. I stored all songs in a dictionary, the key was the song and value was the count of repeated songs in the array. I returned the first song in the dictionary with count >1.