Watch tutorials and explanations by expert teachers that walk through solving this problem.
Math Geeks
LeetJS
Brogrammers
Coding Guys
Code With K5KC
ELeetCoder
rotrA
Chanakya Mantra
hornclause
Solve more problems to master this pattern