Skip to content
Advertisement

recursive method that checks if a string is palindrome in java

the input: “mnkknm” where n=0 the output: flag is always equal 1 while it should be equal 3 and it returns -1 what is the problem ? note : palindrome means for example if the Reverse of malayalam is also malayalam then its palindrome another note : i should write the code recursive as it’s a homework

JavaScript

Advertisement

Answer

try this method please

JavaScript
Advertisement