InterviewSolution
Saved Bookmarks
| 1. |
What is the worst-case running time of unions done by size and path compression?(a) O(N)(b) O(logN)(c) O(N logN)(d) O(M logN)My question is based upon Trees topic in section Trees of Data Structures & Algorithms IThe question was asked by my school teacher while I was bunking the class. |
|
Answer» RIGHT CHOICE is (d) O(M logN) For explanation: The worst case running time of a union operation done by size and PATH compression is mathematically found to beO(M logN). |
|