2 testcases are producing wrong output plz check the code


i have made some changes see it