摘要:
1 import java.util.Iterator; 2 import java.util.NoSuchElementException; 3 4 public class List implements Iterable 5 { 6 private int N; 7 private Node first; 8 private N... 阅读全文
摘要:
1 /************************************************************************* 2 * 3 * A generic queue, implemented using a *circular* linked list. 4 * (Exercise 1.3.29) 5 * 6 * ... 阅读全文
摘要:
1. 2. 阅读全文
摘要:
1 package algorithms.exercise; 2 3 import algorithms.ADT.Stack; 4 import algorithms.util.StdIn; 5 import algorithms.util.StdOut; 6 7 8 /**************************************************... 阅读全文
摘要:
1 @Test 2 public void e1_3_5() { 3 Stack stack = new Stack(); 4 int N = 7; 5 while (N > 0) { 6 stack.push(N % 2); 7 N = N / 2; 8 ... 阅读全文
摘要:
1. 2. 3. 阅读全文
摘要:
1 /****************************************************************************** 2 * Compilation: javac Parentheses.java 3 * Execution: java Parentheses 4 * Dependencies: In.java Sta... 阅读全文
摘要:
1. 2. 阅读全文