Showing 3 of 270 questions
Given an array representing the height of bars, calculate how much water can be trapped between them after rain. Think about finding the maximum height to the left and right of each bar.
#1. Trapping Rain Water
Find the minimum sum of a path from the top-left to the bottom-right corner of a grid. You can only move down or right at each step.
#2. Minimum Path Sum
Find the minimum element in a sorted array that has been rotated. The array was initially sorted, but some portion of it has been shifted to the beginning.
#3. Find Minimum in Rotated Sorted Array