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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user