Math Fundamentals18 sections · 814 units
Open in Course

Lessons from Container

summary

Three points:

1.1. Optimization problems often involve maximizing or minimizing a formula. Write the formula first, then think about how to evaluate it efficiently.

2.2. Two pointers work when moving one pointer in a certain direction guarantees you don't miss the answer. This requires reasoning about what happens to your objective function.

3.3. Sometimes algebraic reasoning (which variable limits the result) guides your algorithm choice.