Skip to content

Latest commit

 

History

History

BinaryPostorder

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Binary Tree Postorder Traversal

Leetcode Link

Problem:

Given the root of a binary tree, return the postorder traversal of its nodes' values.

Example:

Input: root = [1,null,2,3]
Output: [3,2,1]
Input: root = []
Output: []
Input: root = [1]
Output: [1]
Input: root = [1,null,2]
Output: [2,1]

Note:

  • The number of the nodes in the tree is in the range [0, 100].
  • -100 <= Node.val <= 100