Watch tutorials and explanations by expert teachers that walk through solving this problem.
Khushboo Goel
HackerHeap
Alex Brou
Eric Lee
Aalekh Jain (ironmaniiith)
algobest - Computer Science
GDSC FIU
Science Tech & CS World
Math Geeks
Solve more problems to master this pattern