[LC] Added three states solution to postorder traversal.