We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37f26e3 commit 2a54daeCopy full SHA for 2a54dae
data-structure/queue/queue-original.js
@@ -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