Sort any array in time O(n) ???

Правка en1, от LongQuan, 2016-01-14 19:03:04

I try sort any number array with complexity O(n). I have adjusted Counting sort. 1. I divide input into 2 case: negative array case and positive array case 2. I sort and combine 2 array in 2 case 3. get output

=> complexity O(n)

- GIVE ME YOUR BUG?

code here: my Code

Теги sorting, o(n), counting sort

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский LongQuan 2016-01-14 19:03:04 383 Initial revision (published)