Skip to content

Commit 75bd24c

Browse files
committed
modified: 20.valid-parentheses.cpp
1 parent 527fdcd commit 75bd24c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

20.valid-parentheses.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,11 @@ class Solution {
6969

7070
for(int i=0;i<s.length();i++){
7171
if(s[i]=='('|| s[i]=='{' ||s[i]=='[')
72-
st.emplace(s[i]);
72+
st.emplace(s[i]);
7373
else if(!st.empty() && st.top()==closer[s[i]])
74-
st.pop();
74+
st.pop();
7575
else
76-
{
7776
return false;
78-
}
7977
}
8078
return true;
8179
}

0 commit comments

Comments
 (0)