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.
微信扫一扫
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.