We can use recursive to solve, every time we can check if current situation can append ‘(’ or ‘)’. Then append it recursive. If meet left == n and right == n, store the string.
Not too many point to take care.
leetcode-22-Generate Parentheses
阅读 58
2023-08-23
We can use recursive to solve, every time we can check if current situation can append ‘(’ or ‘)’. Then append it recursive. If meet left == n and right == n, store the string.
Not too many point to take care.
相关推荐
精彩评论(0)