An open API service indexing awesome lists of open source software.

https://github.com/felipeaz/two-pointers

Two Pointers is a pattern used to solve problems with sorted arrays to find a set of elements
https://github.com/felipeaz/two-pointers

Last synced: 3 months ago
JSON representation

Two Pointers is a pattern used to solve problems with sorted arrays to find a set of elements

Awesome Lists containing this project

README

        

# two-pointers
Two Pointers is a pattern used to solve problems with sorted arrays to find a set of elements

When to use the Two Pointer method:
- Problems where you deal with sorted arrays and need to find a set of elements
- The set of elements in the array is a pair, a triplet, or even a subarray

Problems that feature the Two Pointer pattern:
- Squaring a sorted array
- Triplets that sum to zero
- Comparing strings that contain backspaces