Data structures and algorithms · Counting steps
Two pointers and formulas
Two ways to do less work: walk from both ends, or skip the loop. · 10 minutes
Predict first
In a sorted list, left points at the smallest number and right at the largest. Their sum is too big. What can you conclude?