Skip to main content
← All Tags

Dynamic Programming

2 articles in this category

AlgorithmsInterviewDynamic Programming

Maximum Subarray: Kadane's Algorithm and the Art of Local vs Global Optimization

Discover how Kadane's algorithm finds the maximum sum subarray in O(n) time. Learn why tracking local maximums leads to global solutions, and how this pattern applies far beyond array problems.

Read more
AlgorithmsInterviewDynamic Programming

Best Time to Buy and Sell Stock: Finding Profit in a Single Pass

Learn how to find the maximum profit from a single stock transaction with an elegant O(n) solution. Discover why tracking the minimum price is the key insight that transforms this problem from complex to simple.

Read more