mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 23:28:29 +08:00
Update
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user