文章列表
<input type=checkbox name=mm value=a onclick="checkItem(this, 'mmAll')"><br>
<input type=checkbox name=mm value=b onclick="checkItem(this, 'mmAll')"><br>
<input type=checkbox name=mm value=c onclick="checkItem(this, 'mmAll')"><br>
< ...
- 2009-05-24 22:08
- 浏览 1855
- 评论(0)
public class StackSLinked implements Stack {
private SLNode top; //链表首结点引用
private int size; //栈的大小
public StackSLinked() {
top = null;
size = 0;
}
//返回堆栈的大小
public int getSize() {
return size;
}
//判断堆栈是否为空
public boolean isEmpty() {
return size==0;
}
//数据元素e入栈
public void ...
- 2009-04-21 18:07
- 浏览 678
- 评论(0)
public class StackArray implements Stack {
private final int LEN = 4; //数组的默认大小
private Object[] elements; //数据元素数组
private int top; //栈顶指针
public StackArray() {
top = -1;
elements = new Object[LEN];
}
//返回堆栈的大小
public int getSize() {
return top+1;
}
//判断堆栈是否为空
public boolean ...
- 2009-04-21 18:05
- 浏览 977
- 评论(0)