02 Sep 2005

Ruby-obviated Algorithmic Agony

Theory of Algorithms requires that we code up the basic “stable matching” algorithm ourselves. After much confused discussion in class today about whether to represent people as arrays, or vectors, or three-dimensional arrays (?!), I went to implement it in ruby. In a happy recurrence of what seems always happen, it was easier and faster than I thought it would be.

The algorithm worked out to this:
Liquid error: No such file or directory – posix_spawnp

The classes employed to make the algorithm so happily brief:
Liquid error: No such file or directory – posix_spawnp

Whee. Yet another 10 hours of agonizing C++ debugging avoided.