678. Valid Parenthesis String
678. Valid Parenthesis String
Description

Solution
Using a list to store the availiable number of * scaned forward. If we meet a ‘)’ and there is no ‘(‘ in the stack, then we gonna use * to match.
As for mismatched ‘(‘, we should use * following to match it.
Code
1 | class Solution { |

All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.

