📄 graphstack.java
字号:
package datastructure;
class GraphStack {
public GraphStack() {
st = new int[20];
top = -1;
}
public void push(int i) {
st[++top] = i;
}
public int pop() {
return st[top--];
}
public int peek() {
return st[top];
}
public boolean isEmpty() {
return top == -1;
}
public int size() {
return top + 1;
}
public int peekN(int i) {
return st[i];
}
private final int SIZE = 20;
public int st[];
private int top;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -