Some test cases failed

Kindly guide me on this code,I think it is fine from my side