e29 fixed dequeue error

This commit is contained in:
Tanmay 2023-12-05 10:19:07 +05:30
parent 75bd1ee855
commit 6637f9ce6e

View File

@ -16,7 +16,7 @@ class queue {
int emptyCheck() {
// Check if it's empty
if (front==-1) {
if (front==-1 || front>rear) {
return 1;
}
else {