Watch tutorials and explanations by expert teachers that walk through solving this problem.
Leila Gharani
Greg Hogg
NeetCode
ThePrimeTime
Solve more problems to master this pattern