Leetcode- 144, 589, 226, offer - 32, 110, 112, 105, 222, offer - 54, offer - 26, 662, 968
Leetcode- 03.04, 682, 844, 946, 20, 1021, 1249, 145, 331, 227, 636, 1124
The stack can handle problems with full inclusion relation.
Leetcode- 622, 641, 1670, 933, 17.09, 859, 969, 621
Leetcode- 141, 142, 202, 206, 92, 25, 61, 19, 83, 82, 86, 138
Problem solving tips
1. Determine the circle in a list: Fast & Slow pointer.
2. Head address may change: Create a virtual head node.
First of all, a prime number has the property that it is only divisible by 1 and itself. Our goal is to filter out the prime numbers in the given range, for example, if the range is 1-10, the answer is 2, 3, 5, 7.
Two questions