This commit is contained in:
youngyangyang04
2020-07-24 12:15:23 +08:00
parent 6e5620132e
commit f96ba21e35

View File

@ -17,7 +17,7 @@ public:
else if (s[i] == '{') st.push('}');
else if (s[i] == '[') st.push(']');
else if (st.empty() || st.top() != s[i]) return false;
else st.pop();
else st.pop(); // st.top() == s[i]
}
return st.empty();
}