Silder window
Either from left and max right
right = 0
for left in range(n):
while condition == True and r < n:
r += 1
or from right and max left
left = 0
for right in range(n):
while condition == True and l < r:
l += 1
Either from left and max right
right = 0
for left in range(n):
while condition == True and r < n:
r += 1
or from right and max left
left = 0
for right in range(n):
while condition == True and l < r:
l += 1