Bug Report for https://neetcode.io/problems/max-water-container
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
class Solution:
def maxArea(self, heights: List[int]) -> int:
longest=0
L=0
R=len(heights)-1
while L<R:
total=min(heights[L],heights[R])
mult=R-L
total*=mult
longest=max(total,longest)
if heights[L]>R:
R-=1
else:
L+=1
return longest
this passes the test case and it shouldnt.
it just happens that the values are less than the length of the list i guess