Motivation for a Third Implementation
As before:
- Grades are in the range 0..100,000.
- The are only 250 students in the class.
However:
- It is very likely that the number of distinct grades will be quite small.
Shortcomings of second implementation:
- Wasted time searching over duplicate elements.
- Wasted time iterating over 100,001 different grades, most of which have multiplicity 0.