145_Binary Tree Postorder Traversal
145. Binary Tree Postorder Traversal
Question
Given a binary tree, return the postorder traversal of its nodes' values.Example 1
Given binary tree [1,null,2,3],
1
\
2
/
3
return [3,2,1]Solution 1: recursive
Solution 2: iteratively (my solution, easy to understand)
Another version, popular online
Another version, hard to understand
Last updated