Module Introduction to two pointers

Introduction to two pointers

**Frequency: 6/10** Help lowering time and memory complexity. In some cases, two pointers can be used instead of binary search.

Resources

- [USACO Guide: Two pointers](https://usaco.guide/silver/two-pointers)

Problems

Merge array 784 / 812 800
Brewing potion 2 641 / 706 800
Unique elements 542 / 590 800
Small range 392 / 439 800
Number of pairs 515 / 529 800
Sum of three values 385 / 480 900
Brewing potion 3 241 / 319 900
Brewing potion 4 225 / 240 900
Three sequences 191 / 200 1000
Biggest submatrix 150 / 170 1100
Choosing numbers 120 / 142 1200