i want to know the missing edge case so that i can implement it.
My code - https://onlinegdb.com/tD6Z9we_k
It is failing test case 0.
Unable to figure out an edge case
hi @akashagarwal1321
what u were doing wrong is only checking by dividing in 2 halves and check if they are same or not… but u will have to recursively check it, till strings are breakable…
consider this example–>
oloaxgddgujq
oloaxgujqddg
on first division the strings are:
oloaxg ddgujq
oloaxg ujqddg
now here first 2 haves are same, but second 2 halves are currently not same.. so further diving the later 2 halves,
ddg ujq
ujq ddg
now u see first half of above string is same as 2nd haf of lower string, and vice versa.. hence o/p for the above test case should be YES, while u were printing NO..
Hope it clears ur doubt…
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.