LeetCode 135. Candy
This problem can be see as finding peak and valley. And we need to start checking the peak in order to remove the redundant count.
This problem can be see as finding peak and valley. And we need to start checking the peak in order to remove the redundant count.
I’ve ran into a problem recently while deploying my HEXO blog to GitHub.
Note of learning resource operation.
Note of learning Transaction Management.
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.