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