DSA Problems
Problems, explained so they click
One problem at a time: the slow idea first, then the trick that makes it fast, a visual you can step through, and clean code in Python, Java and C++.
Problem of the day
18 Nov 2026Hard
2911. Minimum Changes to Make K Semi-palindromes
Cut a string into k pieces so the fewest letters need changing to make every piece a semi-palindrome: price every piece once, then pick the cuts with DP.
- Partition DP
- Precomputation
- Palindromes
- Divisors & Number Theory
- Two Pointers
LeetCode · Visual walkthrough · Python, Java, C++Solve it with me