队列
API设计
public void enqueue(T t ){
if (last == null ){
last = new Node (t ,null);
head.next = last;
}else{
Node oldlast =last;
last = new Node (t,bull)
oldlast.next =last;
}
N++;
}
public T dequeue(){
if(isEmpty()){
return null;
}
Node oldlast =head.next;
head.next = oldlast.next;
N--;
if(isEmpty()){
last = null;
}
return oldlast.item;
}