diff --git a/src/models/Queue.ts b/src/models/Queue.ts index 0ecbbf2..40f37ad 100644 --- a/src/models/Queue.ts +++ b/src/models/Queue.ts @@ -7,7 +7,7 @@ export default class Queue { store: Map = new Map(); peek() { - return this.store[this.tail]; + return this.store[this.head]; } public enqueue(item: T) {