678. Valid Parenthesis String
- If you use stack to solve this question, it will be complex to handle different cases!
- If you use dfs to search if is valid, it will be time consuming!
1 | class Solution(object): |
22. Generate Parentheses
1 | class Solution(object): |
- Follow up : 3 {}, 2(), 1[]