Binary search tree
3 flashcards · Computer Science · by Sureshkumar Ramanujam
Whether binary search tree can be used for sorting?
Yes
Whether the given tree is a binary search tree?
No, because node 2 should be the right child of 1.
Write a c code for inserting an element 15 when there is a root node 20
void insert(int X, Tree T) { T=malloc(sizeof(struct bst); if(X<T->data) { T->left=insert(X,T->left); } }