LAPIN - Need help

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

can someone tell me why I am getting the wrong answer? .My answer is working correctly for test cases.
I am dividing the string into two parts and then applying sorting algorithm to these two strings, after this comparing the string equals or not.

I didn’t understood your title of question… “Editorial” ??
I think you should edit it as “wrong ans in LAPIN” or “help in LAPIN” or something like that

Next time I’ll take care of it

not that I am qualified to ask, but since you are using C++, why not just use the string class ?

and, considering that both s1 and s2 will always have the same length( if they are not of same length, then there is something wrong in the program ), I think you can just use j as the length, since it will always be equal to the length of s2
edit : the concept of how to solve it is correct, it’s just the execution is probably wrong, and considering that you are already using C++, there exist a method called substr for the string class in C++. not sure if you are interested, my concept is the same as yours CodeChef: Practical coding for everyone
note : slicing is same as python

Thank you for your help.