Arrays

June 3, 2021
Tech

Array problems are many and can be some of the trickiest in the business. There are many problems that seek the maximum or minimum value of subarrays and subsequences and there could be many ways to solve a problem. Problems with arrays can be solved with Dynamic Programming, Two Pointers, Sliding Window or using a data structure such as a Hash Map or a Heap. Below are some problems categorized by problem solving strategy.

Problem Strategy Description
Maximum Size Subarray Sum Equals K HashMap Find maximum length subarray whose sum equals to K.
Subarray Sum Equals K HashMap Find total number of subarrays whose sum equals to K.
Contiguous Array HashMap Find maximum length subarray with equal numbers of 1's and 0's.
Maximum Product Subarray Visualize Find largest product of any subarray.
Maximum Subarray Visualize Find largest sum of any subarray.
Maximum Product of Three Numbers Visualize Find maximum product of three numbers in array.



Related Posts

Stay Updated

Thank you! Your submission has been received!

Oops! Something went wrong while submitting the form