Binary-search-tree
November 26, 2023Binary-search-tree
November 26, 2023Data-Structures
Question 1 |
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?
| |
| |
| |
|
Question 1 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.
Correct Answer: D
Question 1 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