Watch tutorials and explanations by expert teachers that walk through solving this problem.
NeetCode
Algorithms Made Easy
Timothy H Chang
Coding Decoded
Prankur Gupta
Algorithms Casts
Programming Live with Larry
Peeyush K. Misra
Programming Live with Larry