This repository has been archived on 2022-06-22. You can view files and clone it, but cannot push or open issues or pull requests.
usaco-guide/content/4_Silver/5_Silver_2P.md
Benjamin Qi 6e9f121024 minor
2020-06-09 12:57:44 -04:00

1.5 KiB

slug title author order prerequisites
/silver/two-pointers Two Pointers Darren Yao 5
Silver - Sorting

Two pointers refers to iterating two monotonic pointers across an array to search for a pair of indices satisfying some condition in O(n) time.

Tutorials

  • Intro to USACO 14.1
  • CPH 8.1

Problems

Extensions

The two pointers technique can be extended to the two dimensional sliding window algorithm. If you're looking for a more challenging problem using 2-D sliding window, see USACO Plat Fort Moo.