Height of Binary Tree |Binary Search Tree | Insertion

preview_player
Показать описание
GATE 2004 | Programming and Data Structures | Trees

Find the height of a Binary tree
Insert in Binary Search Tree

Question
The following numbers are inserted into an empty binary search tree in the given order: 10, 1, 3, 5, 15, 12, 16.
What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?

(A) 2
(B) 3
(C) 4
(D) 6

Answer: (B)

GATE - 2004
SUBJECT - Programming and Data Structures
TOPIC - Trees
MARKS - 2
SET - NA
TYPE OF QUESTION - MCQ
PAPER - CS
19
Рекомендации по теме
Комментарии
Автор

Brilliant explanation sir thank u soo much, , ,
But plzz can u tell me one two thing one is suppose if in case of that leaf node 5 if it was -5 then also height of the tree wil ve 3 or what?i mean negative sign will not change na anything???
And another thing please tell me how to find degree of this tree ??plzz sir rpely fast i have exam tomorrow data structure 😟😟😟😟

souramitadebnath