Run Error for Rearrange String

Although my code is working correctly on local-computer, but when I submit it on CodingBlocks, I get Run Error for each test case

Can I know why ?

hello @maheshghamand

in input file they dont have s=“abc” formatting.

they given input like abc

Yes, I have already made arrangements for that but still my code is not working on codingBlocks, although it is working correctly on local-machine and ide.codingblocks.com

Here is my code - https://ide.codingblocks.com/s/459206

just read input like this->

word=input();

ans = rearrangeString(word)

ur input will a string only .
it will not be in format s=“string”

Sorry, I don’t read your first-answer carefully.

Now I have corrected my mistake by taking string as word = input()

Now, Test Case 0 and 1 are passing but Test cases 2, 3, 4, 5 giving result as - Wrong Answer

your code look correct ,try submitting it over leetcode.
u r getting wrong answer becuase ur generated sequnce (which is correct) is not matching with the sequence output file(as there can be multile valid sequence, cb checker is not able to check all possible solution) .

The code worked on leetcode successfully - https://leetcode.com/submissions/detail/480919437/

Thanks for the help :+1:

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.