# Kadane's Algorithm

Today I was working through a dynamic programming problem in Leetcode when I encountered a reference to an algorithm that I had not heard of before: **Kadane’s Algorithm**. I wanted to write a quick post to explain this algorithm in more detail, and hopefully this will help me solve more Leetcode problems, too. I’ll start by describing the problem that Kadane’s Algorithm solves, and some of the contexts where it appears in practice. Then I will describe a number of ways to solve it, including Kadane’s Algorithm.