I’ve read other solutions and my solution has similar logic as accepted solutions.
I realized that using HashMap was unnecessary but still can someone tell me which cases are not handled in my solution?
Here is the question and this is my solution.
I have handled all cases where output is “NO” in the 1st if statement on line 22 of my solution.