Container With Most Water at Goldman Sachs
Medium59.5% acceptance
This problem has 62.5% frequency at Goldman Sachs.
Problem Description
You are given an integer array `height` of length `n`. There are `n` vertical lines drawn such that the two endpoints of the `ith` line are `(i, 0)` and `(i, height[i])`. Find two lines that together with the x-axis form a container, such that the container contains the most water. Return _the max...
Read full problem and hintsTopics
Also asked at 57 companies
More Goldman Sachs Questions
Trapping Rain WaterHardMedian of Two Sorted ArraysHardSearch in Rotated Sorted ArrayMediumMinimum Path SumMediumFind Minimum in Rotated Sorted ArrayMedium
View all Goldman Sachs questions