Not able to clear one test case
so basically I am running a loop till smallest length of a and b
for example in case of bat and batman the loop will run three times then inside the loop I am comparing each letter of both the string and then storing the jth position in index
if index is equal to 2(as we are starting loop from 0) then it has covered bat completely and therefore it is substring of batman therefore we swap it
by the way I found the error and passed the test cases
ok…cool

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.
