Watch tutorials and explanations by expert teachers that walk through solving this problem.
vanAmsen
Algorithms Made Easy
ExtremeProgrammer
HowToLeetCode
Just Coding, with Jie
robzingcod
Solve more problems to master this pattern