Update
This commit is contained in:
parent
cb1837033b
commit
d531fe6a5e
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue