Some quite atrocious code from a quite dated data structures book that makes for an excellent refactoring exercise.