Select Page

## Sliding Window: Minimal Window of Array

Sliding Window Sliding window is a common approach in solving algorithm problems, it has a few elements: Window start and endStatus of elements in the windowWindow extends to the right according to the statusWindow shrinks to the right according to the statusWindow...

## Maximum Size Subarray Sum Equals K

Maximum Size subarray problem Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn’t one, return 0 instead. Note:The sum of the entire nums array is guaranteed to fit within the 32-bit signed integer range....

## Maximum Product Subarray

Maximum Product Subarray Problem Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest product = 6. Reduction Transition...

## Maximum Subarray

Maximum Subarray Problem Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray [4,-1,2,1] has the largest sum = 6. Reduction Transition...