Tag: containerwithmostwater
-
Data Structures and Algorithms – Arrays – Container with Most Water
Problem: Given an array of heights representing the ends of a container , find the container with the maximum area. For example: Consider the below input: Input: height = [1,8,6,2,5,4,8,3,7] The height can be represented pictorially as below: Each line represents each height in the array in the order of the indices. You can join…