In my version of the program, I used the following subprograms: treapRotateLeft treapRotateRight treapCount treapHeight treapWrite treapDelete treapInsert itemLoadTreap {Loads items from in input file into a treap.} treapOk {Boolean. Checks to see whether treap conditions hold.} My program is less than 4 pages long. I was not trying to make it as short as possible (nor should you).