Spotify interview question

Data structure related algorithms on hackerank tool