94. Binary Tree Inorder Traversal
https://leetcode.com/problems/binary-tree-inorder-traversal
class Solution:
def postorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
return self.travel([], root)
def travel(self, result, node):
if not node:
return
self.travel(result, node.left)
result.append(node.val)
self.travel(result, node.right)
return result