Aspire's Library

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

Previous Year Question (PYQs)



Consider a completely skewed (left / right) binary search tree with n elements. What is the worst case time complexity of searching an element in this tree?





Solution

A completely skewed BST (all nodes on one side) has height \(n\). Searching may traverse every node in the worst case.

Worst-case time complexity: \(O(n)\)



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...