Watch tutorials and explanations by expert teachers that walk through solving this problem.
BarikZone
Programming Live with Larry
litCode
DCC NITA
LetsCode
Algorithms Casts
Tim Huang
Solve more problems to master this pattern