message: Update valid-parenthesis-string.cpp
diff: @@ -6,19 +6,10 @@ public:
  bool checkValidString(string s) {
  int lower = 0, upper = 0; // keep lower bound and upper bound of '(' counts
  for (const auto& c : s) {
  - if (c == '(') {
  - ++lower;
  - ++upper;
  - } else if (c == ')') {
  - if (upper == 0) { // '(' count is not enough
  - return false;
  - }
  - lower = max(lower - 1, 0);
  - --upper;
  - } else {
  - lower = max(lower - 1, 0);
  - ++upper;
  - }
  + lower += (c == '(') ? 1 : -1;
  + upper -= (c == ')') ? 1 : -1;
  + if (upper < 0) break;
  + lower = max(lower, 0);
  }
  return lower == 0; // range of '(' count is valid
  }
  