演算法›Ch4 圖論演算法
第 3 題/共 111 題
◀ AL 3/111
3. Union-Find、Disjoint Set、Amortized Analysis
#AL-04-003中Union-FindDisjoint SetAmortized Analysis

Consider the linked-list representation of disjoint sets, where: (1) Each set is represented by a linked list; (2) Each element stores a pointer to the set's representative; (3) UNION(x, y) appends the shorter list to the longer list (union by size); (4) FIND-SET(x) runs in O(1)O(1) time. Suppose we start with nn singleton sets and perform any sequence of UNION and FIND-SET, using union by size. Which of the following statements is correct?

📄 台大115
跳轉到第題
▤完整推導請見《WH 資工筆記 · 演算法》Ch4 圖論演算法
本章題號 · 1–20 / 111