2 test cases failed

piyush-and-magical-park

Hello @anujsharmabadboy,

I have corrected your code:

Refer to comments for better understanding.

Hope, this would help.
Give a like if you are satisfied.