摘要: 1 public class BinaryHeap<E extends Comparable<? super E>> 2 { 3 4 public static void main(String[] args) 5 { 6 Integer[] array = {0, 12, 90, 1, 85, 12, 3, 13, 49, 7 55, 10, 3, 31, 97, 19, 93, 41, 55, 56, 82, 2}; 8 9 BinaryHeap<Integer> he... 阅读全文
posted @ 2012-07-10 15:55 rilley 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1 public class DisjoinSet 2 { 3 4 public static void main(String[] args) 5 { 6 DisjoinSet disjoin = new DisjoinSet(8); 7 8 disjoin.union(4, 3); 9 disjoin.union(5, 4);10 disjoin.union(6, 5);11 disjoin.union(7, 6);12 disjoin.union(8, 7);13 ... 阅读全文
posted @ 2012-07-10 15:54 rilley 阅读(250) 评论(0) 推荐(0) 编辑