Doubt in my code

Hello, here is my code :

Only 1 testcase is passing and all others are failing. Why is it so ?

Ok I have resolved the issue. So I am marking it as resolved.