Watch tutorials and explanations by expert teachers that walk through solving this problem.
NeetCode
Bradley Allen
College Wallah
NeetCodeIO
Wisdom Dream
Prep Insta
R Sai Siddhu
Solve more problems to master this pattern