NewThe Learning module is now liveSee what's new

You are tasked with implementing the analytics core for a cloud-based music player platform. Your system must efficiently record song additions, user plays, and generate reports summarizing song popularity by distinct users. All data is stored in memory. You may assume all song and user IDs provided to the methods are valid.

Implement the MusicPlayer class:

  • MusicPlayer() Initializes the music player system.
Test Cases
Input
Output
Expected