three solutions added. two recursive, one iterative using stack.
add a solution~ very good comparison example