If single correct comes B is safer to go with.

The Gateway to Computer Science Excellence

+3 votes

In which tree, for every node the height of its left subtree and right subtree differ almost by 1?

- Binary Search Tree
- AVL Tree
- Threaded Binary Tree
- Complete Binary Tree

+8 votes

AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right sub-trees cannot be more than one for all nodes.

Hence,Option**(B) AVL Tree **is the correct choice.

+2 votes

Although by definition of AVL tree(or height balance tree) right ans is B .But i think same property also holds for complete binary tree

as from a full binary tree if we start removing elements from the right most child we will always get a tree which is height balanced

any expert comments if i am wrong

as from a full binary tree if we start removing elements from the right most child we will always get a tree which is height balanced

any expert comments if i am wrong

0

Although the fact you given here for complete binary tree is likely to AVL tree, but the purpose of self balancing binary search tree is different than complete binary tree.

In complete binary no such properties(i.e. every node the height of its left subtree and right subtree differ almost by 1) holds.

Also self balancing binary search tree is used for other data structure such as priority queue.Self-balancing binary search trees can be used to construct and maintain ordered lists

These are available Self balancing binary search tree..

Arjun sir can give more clarity here.

0

@Arjun Sir i mean here by definition no such rule for CBT.Because

A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

But this property((i.e. every node the height of its left subtree and right subtree differ almost by 1) comes automatically in a complete binary tree.

Am i rt ?

A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

But this property((i.e. every node the height of its left subtree and right subtree differ almost by 1) comes automatically in a complete binary tree.

Am i rt ?

52,315 questions

60,427 answers

201,751 comments

95,226 users