basic version
recursive sol
add comments for tree traversal
sol of q104