数据结构(java)复习题及答案(5)

2020-11-27 11:48

private int top;

public SeqStack(int capacity) {

}

public SeqStack()

{this(10);

}

回true

return this.top__== -1________; } public boolean push(E element){ //元素element 入栈,若public boolean isEmpty(){ //判断栈是否为空,若空栈返this.value=new Object[Math.abs(capacity)]; this.top=-1; 操作成功返回true

if(element==null) return __false_______; if(this.top==value.length-1){ Object[] temp =this.value; this.value=new Object[temp.length*2]; for(int i=0;i<temp.length;i++) this.value[i]=temp[i];}

this.top___++_______;

this.value[this.top]=___element________; return ___true_____; }}


数据结构(java)复习题及答案(5).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:大物实验5:数据处理

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: