LeetCode 22. Generate Parentheses
We can get the n pairs of parentheses by combining the x pairs with n-1-x pairs then combine with one pair "()".
We can get the n pairs of parentheses by combining the x pairs with n-1-x pairs then combine with one pair "()".
Solve using three ways.
Use two pointers, let them always have a distance of n, so when right pointer reach the end, the left pointer is the last nth node.
Using DFS method to check each possible remove.
Every natural number can be represented as a sum of four non-negative integer squares. That is, the squares form an additive basis of order four
The problem is to find the next word in the wordList.
So we can use the parent to represent grandparent.
Note of learning JDBC Template(To be finished…)
Note of learning JUnit
Note of learning AOP.