InterviewSolution
Saved Bookmarks
| 1. |
What is the average running time of a treap?(a) O(N)(b) O(N log N)(c) O(log N)(d) O(M log N)This intriguing question comes from Binary Trees topic in chapter Binary Trees of Data Structures & Algorithms IThis question was addressed to me in a national level competition. |
|
Answer» RIGHT answer is (c) O(log N) For EXPLANATION: The AVERAGE case and worst case analysis of a TREAP are MATHEMATICALLY found to be O(log N). |
|