fixed bugs, added non-recursive traversal
Merge branch 'master' of https://github.com/jckhnk/general_cs