This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Terminal Cheat Sheet | |
| pwd # print working directory | |
| ls # list files in directory | |
| cd # change directory | |
| ~ # home directory | |
| .. # up one directory | |
| - # previous working directory | |
| help # get help | |
| -h # get help |