Skip to content

Commit

Permalink
Head check fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Oct 6, 2023
1 parent 910f5ff commit 33464ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/Queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class Queue<T> {
store: Map<any,any> = new Map();

peek() {
return this.store[this.tail];
return this.store[this.head];
}

public enqueue(item: T) {
Expand Down

0 comments on commit 33464ef

Please sign in to comment.