HELP!: non-recursive binary tree inorder traversal algorithm 
Author Message
 HELP!: non-recursive binary tree inorder traversal algorithm

I_AM_IN_A_BIND

I need a non-recursive binary tree inorder traversal algorithm.  The
recursive solution, though elegant, is using too much stack memory. (I get
a stack overflow.)  I could also use any include files with advanced
routines for data structures like stacks, queues, linked-lists, trees,
ect...

/* 640K DOS, good to the last byte. */



*** Nothing is as sweet as a beautiful piece of code.



Sun, 11 Jan 1998 03:00:00 GMT  
 HELP!: non-recursive binary tree inorder traversal algorithm

Quote:

>I_AM_IN_A_BIND
>I need a non-recursive binary tree inorder traversal algorithm.  The
>recursive solution, though elegant, is using too much stack memory. (I get
>a stack overflow.)
>/* 640K DOS, good to the last byte. */

build your own stack out of malloc()'ed memory.  Or add a field to the tree
node struct and use the tree itself as the stack.
--
Ron McFarland



Mon, 12 Jan 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. given preorder and postorder traversals of a binary tree How can we find inorder

2. Tree traversal - inorder preorder postorder ??

3. Binary tree traversal - a complex case - Help!

4. Level order Traversal of a Binary Tree ??

5. binary tree traversal

6. HELP: Balanced Binary Tree Algorithm...

7. help????...recursive traversal of a directory

8. Exercise about binary tree and recursive functions

9. HELP with Huffman Tree Traversal - huff2.c (1/1)

10. HELP with Huffman Tree Traversal - huff2.c (1/1)

11. HELP with Huffman Tree Traversal - huff2.c (0/1)

12. HELP Huffman Tree Traversal

 

 
Powered by phpBB® Forum Software