You are given the root of a binary tree.
Return a list of node values when you visit the tree in postorder:
1. Visit left subtree
2. Visit right subtree
3. Visit the node itself
Input: tree = [10, null, 20, 15]
Output: [15, 20, 10]
Explanation:
Left subtree of 10 is empty → right subtree is 20 → left child of 20 is 15. Order: 15 → 20 → 10.
Input: tree = [5, 3, 8, 1, 4, 7, 9]
Output: [1, 4, 3, 7, 9, 8, 5]
Explanation:
Visit left branch fully first (1,4,3), then right branch (7,9,8), finally root 5.
Input: tree = []
Output: []
Explanation:
No nodes to visit.
Accepted:
Submission: