Https://www.codechef.com/viewsolution/39168405

https://www.codechef.com/viewsolution/39168405

can anyone point out whats wrong in my code. It is passing the given sample test cases.

1
2
a
bba

1 Like

@mohitz_007
Try for this input , you’ll realize your mistake.

1
3
bc
aabc
ab

1 Like

thanks guys for help