栈底数据结构Java语言描述.PPT

栈底数据结构Java语言描述

* * 3.2.4 链队列及其基本操作的实现 2. 链队列类的描述(书中P93-94) import cho2.Node; public class LinkQueue implements IQueue { private Node front; private Node rear; } // 队列置空函数 public void clear( ) { } …… // 判空函数 public boolean isEmpty( ) { } front=rear= null; return front== null; public class LinkQueue implements IQueue{ } // 求队列长度函数 public int length( ) { } …… …… 2. 链队列类的描述(书中P93-94) Node p = front; int length = 0; while (p !=null) { p = p.next; //指针下移 ++length; //计数器加1 } return length; publ

文档评论(0)

1亿VIP精品文档

相关文档