Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using PYTHON, You are given an integer list height of length n. The integers inside the list are interpreted as n vertical lines drawn such
Using PYTHON, You are given an integer list height of length n. The integers inside the list are interpreted as n vertical lines drawn such that the two end points of the i-th line(in a cartesian plane) are (i, 0) and (i, height[i]). This is illustrated below in red. Write a function Exercise4(height) such that it finds two lines that together with the x-axis form a container, such that the container contains the most water.
Return the maximum amount of water a container can store.
1iStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started