1
1
mirror of https://github.com/ParkMoonJ/KaoYan.git synced 2026-11-03 22:34:56 +08:00

Update stack.cpp

This commit is contained in:
ParkMoonJ
2021-04-09 14:41:54 +08:00
parent 99c3c9eb6e
commit 9aa5bdb767

View File

@@ -19,7 +19,11 @@ void ClearStack(Stack &S) {
}
bool StackEmpty(Stack S) {
return !(S.top + 1);
if (S.top == -1) {
return true;
} else {
return false;
}
}
int StackLength(Stack S) {