Skip to content

Instantly share code, notes, and snippets.

View matthewgani's full-sized avatar

Matthew Gani matthewgani

View GitHub Profile
Two pointers: one input, opposite ends
```python3
def fn(arr):
left = ans = 0
right = len(arr) - 1
while left < right:
# do some logic here with left and right
if CONDITION: