need helpBinary search tree

Revision en2, by tanvir_cse, 2016-08-15 20:24:19

i want to use a bst for each node of segment tree, then i want to union left bst and right bst into root,,,but when i implement it , it works for root successfully that means it root bst contain all element that left and right bst have and contain the property of bst but the problem is it change the data in left and right child that means for next time if i want to use the left or right bst (not root) it's not the previous bst that means it change with the union operation.

im tried like that

t->bst= unite(t->l->bst ,t->r->bst);

i want to merge the left and right bst in root and also want to the and right bst remain same....

plz anyone explin me how can i do it... thanx in advance

Tags bst, segment tree, advanced data structure

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English tanvir_cse 2016-08-15 20:24:19 13
en1 English tanvir_cse 2016-08-15 18:41:11 719 Initial revision (published)