Watch tutorials and explanations by expert teachers that walk through solving this problem.
Algorithms for Big Bucks
Coding with Minmer
The TryIt Project
SDE Skills
Math Geeks
Elite Code
Programming Live with Larry
LetsCode
ExtremeProgrammer
Solve more problems to master this pattern