union-find算法

public class UF { private int[] id; //份量id(以觸點做爲索引) private int count; //份量數量 public UF(int N) { //初始化份量數組 count = N; id = new int[N]; for (int i = 0; i < N; i++) id[i] = i; }
相關文章
相關標籤/搜索