Watch tutorials and explanations by expert teachers that walk through solving this problem.
leetuition
Programming Live with Larry
Algorithms Casts
Elite Code
Kelvin Chandra
Tony Teaches
AlgoDuo
LetsCode
Solve more problems to master this pattern