Problem
1 | Given a binary tree, return the inorder traversal of its nodes' values. |
Solution
Sol 1 Recursion
1 | # Definition for a binary tree node. |
Sol 2 Iteration
1 | # Definition for a binary tree node. |
1 | Given a binary tree, return the inorder traversal of its nodes' values. |
1 | # Definition for a binary tree node. |
1 | # Definition for a binary tree node. |