Question: 3. Consider the following problem: You have a large collection of music files (e.g., MP3 files), and for each file you know the artist

3. Consider the following problem: You have a large collection of music  

3. Consider the following problem: You have a large collection of music files (e.g., MP3 files), and for each file you know the artist name (as a string) and the song title (also as a string). You wish to find the name of the artist who has the largest number of songs featured in the collection. 1. Describe an algorithm for this problem. For full marks, the algorithm should be as efficient as possible. [15 marks] 2. State the running time of your algorithm, assuming that there are in total n songs, across t different artists. [10 marks]

Step by Step Solution

3.39 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Algorithm for finding the artist with the largest number of songs Step 1 Create an empty dictionar... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!