can anyone post the function to insert elements into a binary tree?[not binary search tree]
Printable View
can anyone post the function to insert elements into a binary tree?[not binary search tree]
It depends on what is the binary tree and how it was implemented.Quote:
Originally Posted by vikasvijayan
can you give the general inserting procedure by using linkedlist?
There is no "general inserting procedure". For example, can you give the general inserting procedure for eating food? If you started with "pick up your fork and spoon", you're wrong, because I intend to use chopsticks for lunch. If you skip that part, you're wrong, because the tools are essential (even if only hands are used). Clearly, I should elaborate, e.g., on the kind of food, the environment, etc.Quote:
Originally Posted by vikasvijayan
So, why don't you show your binary tree implementation thus far?
By the way, what's with the "not binary search tree" clause?
i know the procedure for binary search tree...
I see. So what problem are you facing now? If you can insert into a binary search tree that is implemented using pointers as in a linked list, you should be able to insert into a binary tree that is implemented using pointers as in a linked list.Quote:
Originally Posted by vikasvijayan