Watch tutorials and explanations by expert teachers that walk through solving this problem.
NeetCode
Pepcoding
Happy Coding
Aryan Mittal
code_report
AlgorithmHQ
Alpha-Code
Unplug Nate
Solve more problems to master this pattern