Watch tutorials and explanations by expert teachers that walk through solving this problem.
ELeetCoder
LeetcodeDailyGrind
LeetCore
Amit Choraria
LetsCode
code7you
CodeCracker
hornclause
The learning rabidness
Solve more problems to master this pattern