Watch tutorials and explanations by expert teachers that walk through solving this problem.
Algorithms Casts
Programming Live with Larry
Ethos Typos
Alpha-Code
Think-Twice-Code-Once
Compl3x
Brandon Allen
ELeetCoder
Kyle McFatter
Solve more problems to master this pattern