Work done for the Algorithms course at Princeton