上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 35 下一页
摘要: import java.util.Iterator;public class Stack<Item> implements Iterable<Item>{ private int N; private Node first; private class Node { Item item; Node 阅读全文
posted @ 2018-10-25 13:40 修电脑的龙生 阅读(111) 评论(0) 推荐(0) 编辑
摘要: import java.util.Iterator;public class Bag<Item> implements Iterable<Item>{ private Node first; private int N; private class Node { Item item; Node ne 阅读全文
posted @ 2018-10-25 13:39 修电脑的龙生 阅读(188) 评论(0) 推荐(0) 编辑
摘要: public class Queue<Item>{ private int N; private Node first; private Node last; private class Node { Item item; Node next; } public boolean isEmpty() 阅读全文
posted @ 2018-10-25 13:38 修电脑的龙生 阅读(109) 评论(0) 推荐(0) 编辑
摘要: public class Stack<Item>{ private int N; private Node first; private class Node { Item item; Node next; } public boolean isEmpty() {return N==0;} publ 阅读全文
posted @ 2018-10-25 13:37 修电脑的龙生 阅读(113) 评论(0) 推荐(0) 编辑
摘要: import java.util.Iterator;public class ResizingArrayStack<Item> implements Iterable<Item>{ private Item[] a=(Item[]) new Object[1]; private int N=0; p 阅读全文
posted @ 2018-10-25 13:37 修电脑的龙生 阅读(92) 评论(0) 推荐(0) 编辑
摘要: public class FixedCapacityStack<Item>{ private Item[] a; private int N; public FixedCapacityStack(int cap) {a=(Item[]) new Object[cap];} public void p 阅读全文
posted @ 2018-10-25 13:36 修电脑的龙生 阅读(101) 评论(0) 推荐(0) 编辑
摘要: public class FixedCapacityStackOfStrings{ private String[] a; private int N; public FixedCapacityStackOfStrings(int cap) {a=new String[cap];} public v 阅读全文
posted @ 2018-10-25 13:35 修电脑的龙生 阅读(98) 评论(0) 推荐(0) 编辑
摘要: public class FixedCapacityStack<Item>{ private Item[] a; private int N; public FixedCapacityStack(int cap) {a=(Item[]) new Object[cap];} public void p 阅读全文
posted @ 2018-10-25 13:35 修电脑的龙生 阅读(148) 评论(0) 推荐(0) 编辑
摘要: public class Evaluate{ public static void main(String[] args) { Stack<String> ops=new Stack<String>(); Stack<Double> vals=new Stack<Double>(); while(! 阅读全文
posted @ 2018-10-25 13:34 修电脑的龙生 阅读(304) 评论(0) 推荐(0) 编辑
摘要: public class test{ public static void main(String[] args) { int T=Integer.parseInt(args[0]); VisualAccumulator a=new VisualAccumulator(T,1.0); for (in 阅读全文
posted @ 2018-10-25 11:54 修电脑的龙生 阅读(178) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 35 下一页