Watch tutorials and explanations by expert teachers that walk through solving this problem.
Elite Code
TheGrayMind
Codechef Starters 64
Learn to Code
CyCode
The Nerd Coder
ExpertFunda
Solve more problems to master this pattern