We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d227646 commit 8e8f28fCopy full SHA for 8e8f28f
src/data-structures/queue/Queue.js
@@ -21,7 +21,7 @@ export default class Queue {
21
* @return {*}
22
*/
23
peek() {
24
- if (!this.linkedList.head) {
+ if (this.isEmpty()) {
25
return null;
26
}
27
0 commit comments