Skip to content

Commit

Permalink
Update valid-parenthesis-string.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kamyu104 authored Sep 17, 2017
1 parent 01411d1 commit 6831c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion C++/valid-parenthesis-string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class Solution {
public:
bool checkValidString(string s) {
int lower = 0, upper = 0; // keep lower bound and upper bound of '(' counts
int lower = 0, upper = 0; // keep lower bound and upper bound of '(' counts
for (const auto& c : s) {
lower += (c == '(') ? 1 : -1;
upper -= (c == ')') ? 1 : -1;
Expand Down

0 comments on commit 6831c21

Please sign in to comment.