use C-style comments, consistency
more algorithm design notes
whitespace
subtraction is not comparison

http://www.tedunangst.com/flak/post/subtraction-is-not-comparison