David Hláčik write: > Hi guys, > > i am really sorry for making offtopic, hope you will not kill me, but > this is for me life important problem which needs to be solved within > next 12 hours.. > > I have to create stable algorithm for sorting n numbers from interval > [1,n^2] with time complexity O(n) . > > Can someone please give me a hint. Would be very very thankful! > > Thanks in advance! > D.
I heard a lot of good things about bubble sort: http://www.youtube.com/watch?v=k4RRi_ntQc8 With a really fast computer, it should sort n^2 elements in O(n) complexity (or the other way around, whatever). Now if you have a quantum computer around you, try the quantum bogosort O(n) algorithm: http://en.wikipedia.org/wiki/Bogosort To avoid being off-topic, check also ":help sort" and good luck with your homework! -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
