摘要:
import java.util.Iterator;public class Stack<Item> implements Iterable<Item>{ private int N; private Node first; private class Node { Item item; Node 阅读全文
摘要:
import java.util.Iterator;public class Bag<Item> implements Iterable<Item>{ private Node first; private int N; private class Node { Item item; Node ne 阅读全文
摘要:
public class Queue<Item>{ private int N; private Node first; private Node last; private class Node { Item item; Node next; } public boolean isEmpty() 阅读全文
摘要:
import java.util.Iterator;public class ResizingArrayStack<Item> implements Iterable<Item>{ private Item[] a=(Item[]) new Object[1]; private int N=0; p 阅读全文
摘要:
public class Stack<Item>{ private int N; private Node first; private class Node { Item item; Node next; } public boolean isEmpty() {return N==0;} publ 阅读全文
摘要:
public class FixedCapacityStack<Item>{ private Item[] a; private int N; public FixedCapacityStack(int cap) {a=(Item[]) new Object[cap];} public void p 阅读全文
摘要:
public class FixedCapacityStackOfStrings{ private String[] a; private int N; public FixedCapacityStackOfStrings(int cap) {a=new String[cap];} public v 阅读全文
摘要:
public class FixedCapacityStack<Item>{ private Item[] a; private int N; public FixedCapacityStack(int cap) {a=(Item[]) new Object[cap];} public void p 阅读全文
摘要:
public class Evaluate{ public static void main(String[] args) { Stack<String> ops=new Stack<String>(); Stack<Double> vals=new Stack<Double>(); while(! 阅读全文
摘要:
public class test{ public static void main(String[] args) { int T=Integer.parseInt(args[0]); VisualAccumulator a=new VisualAccumulator(T,1.0); for (in 阅读全文