From 6831c2122b47794d4103b7ca5cfe1c29a20597d1 Mon Sep 17 00:00:00 2001 From: kamyu Date: Sun, 17 Sep 2017 16:05:39 +0800 Subject: [PATCH] Update valid-parenthesis-string.cpp --- C++/valid-parenthesis-string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C++/valid-parenthesis-string.cpp b/C++/valid-parenthesis-string.cpp index ffaa727b4..af21619c9 100644 --- a/C++/valid-parenthesis-string.cpp +++ b/C++/valid-parenthesis-string.cpp @@ -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;