Testcase 1 and 2 showing wrong answer :

code:

hi yash i have commented mistake just go through it