David Hláčik <[email protected]> wrote: > I have to create stable algorithm for sorting n numbers from interval > [1,n^2] with time complexity O(n) .
Count sort? http://en.wikipedia.org/wiki/Counting_sort It's time complexity is O(n), but space complexity in your case is O(n^2). -- Aram Hăvărneanu --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
