Question 9940 – Binary-search-tree
November 26, 2023Question 9597 – Binary-search-tree
November 26, 2023Question 14265 – Binary-search-tree
A binary search tree T contains n distinct elements. What is the time complexity of picking an element in T that is smaller than the maximum element in T?
Correct Answer: D
Question 4 Explanation:
The time complexity of searching an element in T that is smaller than the maximum element in T is O(1) time.
Example:
Comparing that 5<10 will take only a constant amount of time.
Subscribe
Login
0 Comments