Sharpen Your Algorithm Skills

This site is designed to help you explore different algorithmic approaches and problem-solving techniques, whether you're preparing for algorithm interviews or studying on your own to gain a deeper understanding of algorithms and data structures. Go step-by-step: read description > check solution > study examples > dig into the code.

Why do you need to solve LeetCode problems in the AI era?

This is a very easy and very hard question simultaneously. The short answer is - you do not need to do it. AI can do it very quickly and right for you. But the reality is much harder than we think.

Read more →

LeetCode 53. Maximum Subarray - divide and conquer approach

In the previous article, we explored how to optimize LeetCode 53: Maximum Subarray, starting with a Brute Force solution, moving to Dynamic Programming, and finally reducing space complexity to O(1) with Kadane's Algorithm. In this post, we'll take a different approach and solve the same problem using Divide and Conquer. We'll break the array into smaller parts, solve each part recursively, and see how combining the results helps us find the maximum subarray sum.