DIVGOLD - What is the test case am missing ?

Hey, Need help. I am sorting the string and where ever am finding a mismatch , I am printing that character and all characters after it, excluding the first occurrence of the mismatched character, …

Please help me , I am getting WA .

CODE —> http://ideone.com/IzhSPz
Thanks

See this,

Your Code Link: http://ideone.com/0h93wi

AC’ed Code Link: http://ideone.com/lZolSD

Output differs for many test cases

For Example:

CVDRUJG
IFHFWJ
FJFIT
FEFEGFHINE
.
.
and many more

For these cases your code prints

CDVRUJG
FIHFWJ
FFJIT
EFFEGFHINE

Where as the Actual Solutions are:


CDRUJGV
FHFIWJ
FFIJT
EFEFEGFHIN

Happy Debugging… :slight_smile:

1 Like