I have submitted it around 40 times, with minor changes in each submission, but it ended up in WA every time. I’m not able to detect the error in my code. It does this -
i.e. 1 for ‘d’, 2 for ‘m’, 1 for ‘u’, 1 for ‘y’
Then I used selection sort on a and b. Sorting has been done on the basis of the contents of b.
But the elements of both a and b are swapped, so that after sorting, we get:
strcpy(decr,enc) => decr=Dummy!
If the judge is giving WA, then there must be some bug in my code, which I’m not able to encounter. Please help.