All test failing for unique character strings

I can’t figure out for which test cases my code is failing, here is my solution - https://ide.codingblocks.com/s/457063

Can somebody figure out where I am going wrong ?

hello @maheshghamand

ur correct is correct ,it is giving correct output on hidden test cases(i manually checked it). there must be some issue with formating of input file.

try to submit the same logic in c++

Currently, I have decided to use python for all algorithms due to it’s simple syntax, so I can focus on my problem-solving skills only, So I am not going to use C++ for now.

If this input_file issue solved in near future, you can tell me, else You can close this query now ! Thanks for the help :+1:

to validate ur logic, try submitting it over leetcode

ok thanks, from next time I will validate my solution on leetcode (if question found there), before creating query, this will save time for both of us

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.