Sorting an array of length $n$ in $O(m+n)$ time
-
04-11-2019 - |
Frage
I need to find a method to sort an array in $O(m+n)$ time complexity. I understand it should be a variation on Radix sort, however I am not familiar with it or its implementation...
Input: an array $A$ of length $n$, containing values from $-m$ to $m$
Output: a sorted array $A$
Any suggestions will be appreciated, thanks!
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit cs.stackexchange