10-31-2024, 09:21 PM
AB,
your sorting method is probably a shortened version of the counting sort algorithm.
It cleverly uses the array indices.
However, it only works for integers up to the array size, in this case 1024. If there are larger numbers, not everything is sorted.
This could be corrected if the indices are given special treatment or if the normal counting sort algorithm is used.
your sorting method is probably a shortened version of the counting sort algorithm.
It cleverly uses the array indices.
However, it only works for integers up to the array size, in this case 1024. If there are larger numbers, not everything is sorted.
This could be corrected if the indices are given special treatment or if the normal counting sort algorithm is used.