Watch tutorials and explanations by expert teachers that walk through solving this problem.
Kevin Naughton Jr.
Pepcoding
Happy Coding
Seemant Aggarwal
Programming Live with Larry
Java Coding Insight Interview Preparation
Leafy C
JeanTheCoder
The Lofi Dev