Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



The height of a binary search tree for the words banana, peach, apple, pear, coconut, mango and papaya using alphabetical order is:





Solution

Insert words sequentially into BST.


banana → root


peach → right of banana


apple → left of banana


pear → right of peach


coconut → left of peach


mango → right of coconut


papaya → right of mango


Longest path:


banana → peach → coconut → mango → papaya


Number of edges = 4



Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...