e29 fixed dequeue error
This commit is contained in:
parent
75bd1ee855
commit
6637f9ce6e
@ -16,7 +16,7 @@ class queue {
|
|||||||
|
|
||||||
int emptyCheck() {
|
int emptyCheck() {
|
||||||
// Check if it's empty
|
// Check if it's empty
|
||||||
if (front==-1) {
|
if (front==-1 || front>rear) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user