In the course material, there is an example for week 4 of an algorithm using a dictionary for finding a mode of a list.
Another efficient way to find a mode is to sort the elements and go through the list from left to right while keeping track of how many times each element is repeated.
Compare the efficiency of the above two solutions for an input list containing 107 random numbers in the range 1…1000.
In this task you get a point automatically, when you fill in your results and the code you used, and press the submit button.
Running time for the dictionary implementation: s
Running time for the sorting implementation: s
The code you used in the test: