Re: [algogeeks] Re: BST in file

2011-09-29 Thread surender sanke
@asit dhal, in order of any BST is increasing order. so required is only either preorder/postorder surender On Tue, Sep 27, 2011 at 12:42 AM, Gene gene.ress...@gmail.com wrote: Here is a little program to show how it works. It's a nice little problem. There is also a coding with recursion.

[algogeeks] Re: BST in file

2011-09-26 Thread Gene
Here is a little program to show how it works. It's a nice little problem. There is also a coding with recursion. #include stdio.h #include stdlib.h typedef struct node_s { int data; struct node_s *left, *right; } NODE; void print_tree(NODE *tree) { if (tree == NULL) return;

[algogeeks] Re: BST in file

2011-09-25 Thread Asit Dhal
What does it mean by simple BST ?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/Q5mtepDUIx0J. To post to this group, send email to

[algogeeks] Re: BST in file

2011-09-24 Thread asdqwe
you can put two traversals of three (inorder, preorder or postorder) in the file.. Two traversals are enough to dedicate a particular tree. On Sep 24, 4:05 pm, Asit Dhal lipu...@gmail.com wrote: I need to print a binary search tree in file. When I will retrieve the same tree from the file. I

[algogeeks] Re: BST in file

2011-09-24 Thread wetheart
You can put the array representation of binary tree directly, with some obvious modifications ofcourse :) On Sep 24, 5:38 pm, asdqwe ayushgoel...@gmail.com wrote: you can put two traversals of three (inorder, preorder or postorder) in the file.. Two traversals are enough to dedicate a

[algogeeks] Re: BST in file

2011-09-24 Thread vikas
if this is simple BST then only preorder will suffice On Sep 24, 10:16 pm, wetheart gumnaamsm...@yahoo.com wrote: You can put the array representation of binary tree directly, with some obvious modifications ofcourse :) On Sep 24, 5:38 pm, asdqwe ayushgoel...@gmail.com wrote: you can put