Watch tutorials and explanations by expert teachers that walk through solving this problem.
Greg Hogg
NeetCodeIO
Knowledge Center
Happy Coding
Eric Programming
if else statement
ByteQuest
Sleepy Cracker
Solve more problems to master this pattern