J
JC
Hello,
Does anyone know how to get the level(s) in a binary tree.
For example:
(60) Level 0
/ \
(50) (65) Level 1
/ \ \
(49) (55) (68) Level 2
\
(71) Level 3
I tried counting all the "left" or "right" leaves but that doesn't work.
because of children.
Any help would be greatly appreciated.
JC
Does anyone know how to get the level(s) in a binary tree.
For example:
(60) Level 0
/ \
(50) (65) Level 1
/ \ \
(49) (55) (68) Level 2
\
(71) Level 3
I tried counting all the "left" or "right" leaves but that doesn't work.
because of children.
Any help would be greatly appreciated.
JC