Improved code and added test cases.
Merge branch 'master' of github.com:stuycs-apcs-z/hw