stanford algo2 programming assignment 2