Watch tutorials and explanations by expert teachers that walk through solving this problem.
Kevin Naughton Jr.
Greg Hogg
Pepcoding
Apna College
codestorywithMIK
NeetCodeIO
Lit Code
Shaheer Shukur
Deepti Talesra
Solve more problems to master this pattern