node reconstructedthe root picked from pre in this step / being processedjust created / already printed by post-orderROOTLEAFtop two rows: yellow = current recursive range, blue = the root picked in this step
💬 Current step
💻 Lecture C++ code (whole program)
Yellow = current line. ① build(): the first element of pre is the root; split in around it and recurse. ② post-order traversal as a check.
🥞 Recursion call stack build(pre part / in part) · postorder
Speed
Shortcuts: Space play/pause · ←→ step · R reset · E result