題目鏈接
https://leetcode.com/problems/generate-parentheses/description/
思路:DFS
https://www.cnblogs.com/zuoyuan/p/3779797.html
https://blog.csdn.net/asd136912/article/details/79101958
如果左大于右,說(shuō)明產(chǎn)生的“(”小于“)”,是不合法的菱农,直接跳過(guò)返回
題目鏈接
https://leetcode.com/problems/generate-parentheses/description/
思路:DFS
https://www.cnblogs.com/zuoyuan/p/3779797.html
https://blog.csdn.net/asd136912/article/details/79101958
如果左大于右,說(shuō)明產(chǎn)生的“(”小于“)”,是不合法的菱农,直接跳過(guò)返回