Watch tutorials and explanations by expert teachers that walk through solving this problem.
NeetCodeIO
codestorywithMIK
happygirlzt
Athar Mohd
Code Crusaders
Cracking FAANG
Programming Live with Larry
devwithcp
Solve more problems to master this pattern