For sorting 10^9 unique 9-digit numbers, would radix sort or counting sort be faster, and why?

cs.stackexchange https://cs.stackexchange.com/questions/104622

  •  05-11-2019
  •  | 
  •  

문제

For sorting $10^9$ unique 9-digit numbers, would radix sort or counting sort be faster, and why?

I know that radix sort is $O(nk)$ and counting sort is $O(n+k)$, but can’t understand how to apply this.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 cs.stackexchange
scroll top