ЁЯУв Too many exams? DonтАЩt know which one suits you best? Book Your Free Expert ЁЯСЙ call Now!


    Question

    Union-Find with path compression achieves nearly

    constant time because its complexity is:
    A O(log n) Correct Answer Incorrect Answer
    B O(тИЪn) Correct Answer Incorrect Answer
    C O(╬▒(n)) (inverse Ackermann) Correct Answer Incorrect Answer
    D O(n log n) Correct Answer Incorrect Answer
    E O(1) strictly Correct Answer Incorrect Answer

    Solution

    Union-Find with path compression and union by rank has amortized complexity ╬▒(n), which grows slower than log n.

    Practice Next
    More Data Structure Questions
    ask-question