canvas { background-color: #aaa; } One quiet night I was remembering how much fun I had plotting graphics on my TRS-80 Color Computer and lamenting th… ...more
In the last post we finished implementing the TopQueue
class and looked at how it was able to perform so much better than the
plain sorting solution from Part 1.
This time we're going to drill down into Scala and turn our special purpose integer collection into an elegant, general purpose tool. We'll implement and briefly discuss a number of Scala features along the way. ...more
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