The code for CountSort is as shown and I used same method which have to be used in count sort but still im getting all test case with runtime error and wrong answers.
please tell where I’m wrong
The code for CountSort is as shown and I used same method which have to be used in count sort but still im getting all test case with runtime error and wrong answers
your output array creating got too clumsy which was creating problem for the larger test cases
use this simplifed way. added comments for easier understanding
Hope this helps
mam why they have used char array we have to take input as integer mam?
mam please help according to reply shown
you can read it in any way(char arr or int arr) according to the whatever makes your solution easier. theres no such rule