Solved LeetCode program · 145 of 1,000
#0145 · Binary Tree Postorder Traversal
Original English source
Keep a shared values holding 1, 2, and 3. Keep a shared lefts holding -1, -1, and -1. Keep a shared rights holding 1, 2, and -1. Keep a shared order as an empty list of whole numbers.
To gather from node (a whole number). If node is less than 0, return. Gather from item node of lefts. Gather from item node of rights. Place node into order.
Gather from 0. For each node in order, show item node of values.
Expected stdout
3 2 1