牛小飞《数据结构》3.1表-顺序存储结构.pptVIP

  • 1
  • 0
  • 约8.79千字
  • 约 56页
  • 2017-05-30 发布于浙江
  • 举报

牛小飞《数据结构》3.1表-顺序存储结构.ppt

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * set public AnyType set( int idx, AnyType newVal ) { if( idx 0 || idx size( ) ) throw new ArrayIndexOutOfBoundsException( “Index + idx + ; size + size( ) ); AnyType old = theItems[ idx ]; theItems[ idx ] = newVal; return old; } add 原型: public boolean add(AnyType x) 作用:把x插入线性表表尾 public boolean add( AnyType x ) { add( size( ), x ); return true; } add 原型: public

文档评论(0)

1亿VIP精品文档

相关文档