“catfoxcati”, [“cati”, fox"]
it should return 3, but the solution returns an empty string array.
Your input is wrong, cati
and fox
don’t have the same length.
Please read the problem statement again, they mentioned that “You can assume that all words are of the same length”.
2 Likes