Sorting an array in linear time
-
04-11-2019 - |
Pregunta
I need to find a method to sort an array in $O(n)$ time complexity. I saw this link, however I'm not sure how to apply it to the elements I need.
Input: an array $A$ of length $n$, containing values from $1$ to $n^2$
Output: a sorted array $A$
Can someone explain in pseudocode or in words how to do this?
No hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a cs.stackexchange