My answer is same for base test, but on submitting no test case is passing

My code link : https://ide.codingblocks.com/s/424274

Kindly please tell,why my code is not able to pass any test case?

Hey @Deepak_nsit the logic you used is right, but the way you are printing your output is wrong.
With input: “AGGTAB” and “GXTXAYB”
Your output is: AGGTAB
But order in which it’s expected is: GTAB
Try to do it using while loop
code for reference

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.