Some classic problems are worth solving again and again. Although they are not the best solutions, they are much more effective than Leetcode Editorial's solutions. Solve Sudoku by using backtracking is the basic version, but add bitmask to filter out many useless tests can make it much faster.
This is a cubic time solution, which mainly uses the bitmask array method to express the matrix. It is unlikely that anyone would do this. The fastest time has reached 8ms, beating 100% of the C++ participants.
Segment tree is an advance data struture which can solve several Leetcode questions.
Segment tree is basically a binary tree, ; it can be implemented by using binary tree, but most frequently its array representation way. This question needs the segment tree with max; and a method which searchs the 1st basket not less than target & then updates it.
Palindrome question is quite often asked. This question can be solved basically by using counting. It's important to know the 2-letter strings xy & yx can be paired.
The key observation: palindrome strings of even lengths have all letters even occurrences, palindrome strings of odd lengths have all letters even occurrences but except one letter with odd occurrence.