You are given the root of a binary tree. Your task is to return the postorder traversal of the tree.
Input: root = [1,null,2,3]
Output: [3,2,1]
Explanation: The nodes are visited in Left → Right → Root order.
Input: root = [1,2,3]
Output: [2,3,1]
Explanation: The left subtree is visited first, followed by the right subtree and the root.
Input: root = []
Output: []
Explanation: The tree is empty.
Sign in to write, run, and submit your solution against the full test suite.