Watch tutorials and explanations by expert teachers that walk through solving this problem.
Nick White
Knowledge Center
Algorithms Made Easy
Timothy H Chang
Naresh Gupta
CSE Society
Programming Live with Larry
Solve more problems to master this pattern