Some points to remember
- whenever you see search problem, always try to use search alogorithms like binary , merge , quick ..
- nums[i] == nums[i-1] is to prevent checking duplicate again. (This seems to be a good pattern which has been seen in other questions as well).
- Try to use two way pointer
- If you have to make patterns then you need to use the recursive calls
- Sliding window is used when we want consecutive sequence
- for all combinations, use custom method with backtracking
- Shuffle integers
- Optimal Strategy For A Game
- Replace O's with X's
- Find all possible palindromic partitions of a String
- 1769. Minimum Number of Operations to Move All Balls to Each Box
- 678. Valid Parenthesis String
- 20. Valid Parentheses
- 409. Longest Palindrome
- Fenwick tree 1409. Queries on a Permutation With Key