Watch tutorials and explanations by expert teachers that walk through solving this problem.
Greg Hogg
NeetCodeIO
Binod Suman Academy
codingMohan
CODE with Rahul.
GeeksforGeeks Practice
TechWithSaumya
Solve more problems to master this pattern