Song Popularity Ranking

This is a data structure problem asked in online assessment for intern role at a MNC.