3 test cases not passing can you check the code what is the error in the logic


some test cases not passing