Skip to content

Commit

Permalink
auto commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CyC2018 committed Apr 6, 2018
1 parent 4012e90 commit 1085339
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion notes/算法.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,12 @@ public class Queue<Item> {
}

// 出队列
public Item dequeue(){
public Item dequeue() {
if (isEmpty()) return null;
Node node = first;
first = first.next;
N--;
if (isEmpty()) last = null;
return node.item;
}
}
Expand Down

0 comments on commit 1085339

Please sign in to comment.