Every month, there are millions of streamers who stream in a variety of different categories. For this challenge, you'll be working on writing a data structure that will be storing the name of streamers streaming, the number of views they currently have, as well as the category they are streaming in.

The initial input of streamer information will come as a list of strings:

Example: ['Ninja', '100000', 'Fortnite', 'Pokimane', '40000', 'Valorant']

This is interpreted as: "Ninja has 100,000 views and is streaming Fortnite, and Pokimane has 40,000 views and is streaming Valorant." The names of the streamers will be unique. You will not be given any negative numbers for view counts.

You will also be given a list of commands, in the form of a second list of strings, that will manipulate the streamer data or require output:

These commands will be strung together, for example:

['StreamerOnline', 'Bugha', '75000', 'Fortnite', 'StreamerOnline', 'TenZ', '30000', 'Valorant', 'ViewsInCategory', 'Fortnite', 'TopStreamerInCategory', 'Valorant']

→ Expected Return: ['75000', 'Pokimane']


Powered by Fruition