Failing on 4th case of ARE THEY SAME

https://ide.codingblocks.com/s/225263.

I have tried all cases don’t know what to change

@saswat1908
Actually this question is little tricky. You don’t understood the second condition. Here you have to divide your string into 2 equal halve and check for equivalence not for equality. This can be done recursive.
Consider this testcase:
1
oloaxgddgujq
oloaxgujqddg
According to your code, it’s output is “NO” but the actual answer is “YES”. This is because if you divide these string then a1=“oloaxg”, a2=“ddgujg” and b1=“oloaxg”, b2=“ujgddg”. Here a1 is equivalent to b1 since they are equal. Also a2 is equivalent to b2 because if you further divide these string into two halve they become a21=“ddg”, a22=“ujg” and b21=“ujg”, b22=“ddg”. Now a21 is equals to b22 and a22 is equal to b21. Thus a2 is equivalent to b2, hence whole string is equivalent.
try recursive solution.