We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e9064a commit fd9990eCopy full SHA for fd9990e
JavaScript/4-unrolled.js
@@ -11,9 +11,7 @@ class QueueNode {
11
}
12
13
enqueue(item) {
14
- if (this.length === this.size || this.writeIndex >= this.size) {
15
- return false;
16
- }
+ if (this.writeIndex >= this.size) return false;
17
this.buffer[this.writeIndex++] = item;
18
this.length++;
19
return true;
TypeScript/queue.js
0 commit comments