Please see this code i am not getting the correct output

Hello @anshulgurawalia check now:


when you are returning false at the end then it will always return false after hitt ing base case.
you have to return the way i have done in this:

i think there will be AND between the option 1, option 2 becz if any one of the output is true then it will always return true not depending on the other option
i have tried to make AND between the two but that is also not giving me the correct answer

@anshulgurawalia yes right wait let me check again.

@anshulgurawalia check now:


it is printing the correct result now:

@anshulgurawalia but your code is not correct according to the input format of the question.

see this i am taking the input in the correct manner or not but the code is not working
Coding Blocks IDE

@anshulgurawalia this link is not opening.
please share it again.

@anshulgurawalia check now:

how we are checking ( s == true) without giving to the string s

got it !! now but the code is not passing the all test cases

@anshulgurawalia check now: