Watch tutorials and explanations by expert teachers that walk through solving this problem.
THE CODE CLUB
By IITians
Code Harmony
Alpha-Code
Sleepy Cracker
AlgoDuo
techstuffrandom
CS Knowledge
NotYourKoder
Solve more problems to master this pattern