Thuật toán CTDL Disjoint set - ~O(3N+5)

Thuật toán Kahn (kiểm chu trình) - O(N+M)

Nhận xét