Finding the levels of a Binary tree
From: JC (keepit_at_secret.com)
Date: 11/29/03
- Next message: Bob Hairgrove: "Re: Dinkumware / Comeau / DMC??"
- Previous message: Tom Plunket: "Re: Privacy and scope and love"
- Next in thread: White Wolf: "Re: Finding the levels of a Binary tree"
- Reply: White Wolf: "Re: Finding the levels of a Binary tree"
- Reply: Victor Bazarov: "Re: Finding the levels of a Binary tree"
- Reply: Gianni Mariani: "Re: Finding the levels of a Binary tree"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Nov 2003 16:11:22 -0500
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
- Next message: Bob Hairgrove: "Re: Dinkumware / Comeau / DMC??"
- Previous message: Tom Plunket: "Re: Privacy and scope and love"
- Next in thread: White Wolf: "Re: Finding the levels of a Binary tree"
- Reply: White Wolf: "Re: Finding the levels of a Binary tree"
- Reply: Victor Bazarov: "Re: Finding the levels of a Binary tree"
- Reply: Gianni Mariani: "Re: Finding the levels of a Binary tree"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]