CS5 - Improved Algorithms