SanketAndStrings

I am not able to get the test cases passed but the input which i am giving for that correct result is displayed.


This is the solution which i have wrote

Hi tushar
you have written O(n^2) soln. Your code must be giving time limit error.
Try to think in O(n).

Hope it helps
Mark resolved if satisfied :slight_smile:

But i am getting it as
TESTCASE # 1 : run-error (Time: 0 s)
TESTCASE # 2 : wrong-answer (Time: 0.04 s)
TESTCASE # 3 : wrong-answer (Time: 0 s)
wrong-answer