How to figure out what is the test case that is failing?

Problem - Are They Same problem
My Solution - Submission

Test case 1 is failing.

Why I think it is a Divide and Conquer approach?
Please correct me if I am wrong - The fact that the size of the problems(i.e strings) are being reduced by half and we are solving each of those problems in the above algorithm by comparing each of the solutions of the subproblems with each other, we can say that the above algorithm is a Divide and Conquer strategy solution.

Paste your code in the ide and then save it and share the link

1 Like

For the case,
1
aaba
abaa
the ouput should be YES.

Why?
you should split the first string into strings β€œaa” and β€œba”, the second one β€” into strings β€œab” and β€œaa”. β€œaa” is equivalent to β€œaa”; β€œab” is equivalent to β€œba” as β€œab” = β€œa” + β€œb”, β€œba” = β€œb” + β€œa”.

Done - https://ide.codingblocks.com/#/s/29791

It’s the link of the same code, check again