mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-07 07:35:35 +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 (s[i] == '[') st.push(']');
|
else if (s[i] == '[') st.push(']');
|
||||||
else if (st.empty() || st.top() != s[i]) return false;
|
else if (st.empty() || st.top() != s[i]) return false;
|
||||||
else st.pop();
|
else st.pop(); // st.top() == s[i]
|
||||||
}
|
}
|
||||||
return st.empty();
|
return st.empty();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user