Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Data-Structures/Queue/CircularQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class CircularQueue {

// Displays the length of queue
length() {
return this.queue.length - 1
return checkEmpty() ? 0 : this.queue.length - 1
}

// Display the top most value of queue
Expand Down