Shows "Wrong answer" incorrectly


#1

Wrong Answer. Your program’s output doesn’t match the expected output. You can try testing your code with custom input and try putting debug statements in your code.

Your submission failed for the following input:

A : [ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaa", "aa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aa" ]

Your function returned the following :

aa

The expected returned value :

aa


#2

Same here. If u have found the answer then please let me know


#3

same here, if you got ans plz let me too know


#4

Problem might be in the if statement while ending the loop if you try to access the element above the array size these kind of errors are occuring
in this example you may have accessed 3rd element in aa string which gives you ans but as it was outbound its showing as wrong ans.