elegant code, very good
last 2 samples not passed, TODO
Merge branch 'master' of https://github.com/python27/AlgorithmSolution