Partially finish algorithm
Merge branch 'master' of https://github.com/gauss1181/TartanHacks-2014