Hi,
I'm using C language for programming.
Say that you got an array (of size N) that contains only '1's, '2's, '3's, randomly placed.
how would you sort the array to the following form:
1, 1, ..., 1, 2, 2, ..., 2, 3, ...., 3
without using a second array?
Any guidance would be appreciated![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I'm using C language for programming.
Say that you got an array (of size N) that contains only '1's, '2's, '3's, randomly placed.
how would you sort the array to the following form:
1, 1, ..., 1, 2, 2, ..., 2, 3, ...., 3
without using a second array?
Any guidance would be appreciated