- Given an array of numbers list out all quadruplets that sum to 0. Do so with a running time of less than O(n^4).
- Given an array of integers, move all the zeroes to the end while preserving the order of the other elements. You have to do it in-place and are not allowed to use any extra storage.
- Given an array of integers, find the subarray with the largest sum. Can you do it in linear time.
- Maximum subarray sum problem.
- You have an array with the heights of an island (at point 1, point 2 etc) and you want to know how much water would remain on this island (without flowing away).
@ -50,7 +49,7 @@ Arrays
- Given an array of integers, find a maximum sum of non-adjacent elements.
- E.g. `[1, 0, 3, 9, 2]` should return `10 (1 + 9)`.