0 / 0
Settings
<<<>>>
- static void preorder(BinNode rt) {
- if (rt == null) return; // Empty subtree - do nothing
- visit(rt); // Process root node
- preorder(rt.left()); // Process all nodes in left
- preorder(rt.right()); // Process all nodes in right
- }
A
B
C
D
E
F
G
H
I