Binary tree implementation

Gary Herron gherron at digipen.edu
Thu Feb 14 14:36:48 EST 2013


On 02/14/2013 11:18 AM, Megha Agrawal wrote:
> Hello All,
>
> I am a newbie to python language. I need your help in implementation 
> of Binary tree in python. I have a count of nodes and I need to draw a 
> binary tree. Suppose if count is 5 then tree will look like
> 1
>                                                                /   \
>                                                              /     \
>                                                             2       3
>                                                            /  \
>                                                           /    \
>                                                          4  5.
>
> Does anybody have code for this? Or any hint?

I'm confused!  Do you need to *implement* a binary tree or *draw* a 
binary tree.   You say both, but those are very different things. Hint: 
If you want quality (volunteer) help, please put more time into the 
quality of your question.    As it is stated, we really don't know what 
you want help with.

Gary Herron


>
>
> PS: Sorry for previous mail !!
>
> Thank you :)
>
>


-- 
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418




More information about the Python-list mailing list