Aspire Faculty ID #11690 · Topic: CUET 2024 · Just now
CUET 2024

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)\)

Previous 10 Questions — CUET 2024

Nearest first

Next 10 Questions — CUET 2024

Ascending by ID
Ask Your Question or Put Your Review.

loading...