Watch tutorials and explanations by expert teachers that walk through solving this problem.
NeetCode
NeetCodeIO
Bro Coders
Coding Decoded
Programmers Zone
Java Coding Insight Interview Preparation
Programming Live with Larry
Algorithms Casts
LeetCode Solution