Skip to content

Commit 2a54dae

Browse files
author
Wakidur Rahaman
committed
fix(queue-28): toString function added
1 parent 37f26e3 commit 2a54dae

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import LinkedList from "../linked-list/linked-list-original";
2+
3+
export default class Queue {
4+
constructor() {
5+
/**
6+
* We're going to implement Queue based on LinkedList since the two
7+
* structure are quite similar. Namely, they both operate mostly on
8+
* the element at the beginning and the end. Compare enqueue/dequeue
9+
* operations of Queue with append/deleteHead operations of LinkedList
10+
*/
11+
this.linkedList = new LinkedList();
12+
}
13+
}

0 commit comments

Comments
 (0)