A Scala Interview - Part 2
In this post we'll be developing the solution that we began designing in the last post. As a refresher, here's the problem we're solving.
Design and implement a method to select the largest
m
values from a very large list ofn
numbers.
Last time we learned that sorting the entire sequence of n
numbers
doesn't scale. In some cases, the numbers may not even fit in
memory. But with our solution, this won't be a problem.
...more