摘要:
<不重复>List list = new ArrayList(); java.util.Random random = new java.util.Random(); while (list.size() < 100) { //假定产生100个随机数 Integer ii = new Integer(random.nextInt(20)); //随机数都在20以内 if (!list.contains(ii)) { list.add(ii); } System.out.print... 阅读全文
摘要:
Given an adjacency-list representation of a multigraphG = (V, E), describe an O(V + E)-time algorithm tocompute the adjacency-list representation of the"equivalent" undirected graph G' = (V, E'), where E'consists of the edges in E with all the multiple edgesbetween two vertices 阅读全文