Can you tell how to fix my code?

99 ke liye dry run karo tle de raha hai
Always try debugging for small input to get the error

Hey @vatsal38,
I know ki error kaha aa raha hai par can’t fix it,can you help?

@akash_281 string use kar rahe ho toh null check karne ki zarurat nahi coz null character array mein hota hai.
String ki length seedha s.length() se aajati hai