CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Jan 2007
    Posts
    491

    Why don't they use O(n) algorithms in order to sort arrays?

    The Bucket Sort, Count Sort & Radix Sort are algorithms which only take O(n) operations in order to sort an array. They require additional information, but it's not much of a problem because it's possible to find this information and the algorithms will stay O(n).

    Yet, usally when people want to sort arrays, they usally use Quick Sort, Heap Sort or Merge Sort.

    However, if the size of the array is big enough, the O(n) algorithms will be faster.

    So why do people rarely use these algorithms?
    Last edited by Talikag; June 27th, 2008 at 02:51 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured