13lade619
is now a game developer :)
- Reaction score
- 399
Not necessarily a code related question, more on the algorithm.
How do you reconstruct a binary tree with the given?
0 denotes that it doesnt have a son
1 denotes that it has a son.
from that it means that the root node (since it's in postorder) is L has no left son but has a right son
How do you reconstruct a binary tree with the given?
0 denotes that it doesnt have a son
1 denotes that it has a son.
Code:
Postorder
NODE ABCDEFGHIJKL
LTAG 010010110010
RTAG 000010111011
from that it means that the root node (since it's in postorder) is L has no left son but has a right son