Closed Thread
Results 1 to 2 of 2

Thread: Sorting algorithms

  1. #1
    Daskill is offline Newbie
    Join Date
    Dec 2008
    Posts
    24
    Rep Power
    0

    Sorting algorithms

    I've got to count the number of comparisons performed in a particular merge sort algorithm.

    My question is, what counts as a comparison?

    If I have a set of numbers say, [29, 11, 16, 12]

    Does it count as a comparison when I split it up into [29, 11] and [16, 12] or is it just when I'm comparing [29] and [11] or [16] and [12] etc.?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Sorting algorithms

    A split is not a comparison. A comparison is a use of the < or > operators.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Array Sorting Algorithms V
    By whitey6993 in forum C Tutorials
    Replies: 1
    Last Post: 06-29-2011, 11:33 AM
  2. Array Sorting Algorithms I
    By whitey6993 in forum C Tutorials
    Replies: 4
    Last Post: 11-08-2010, 04:13 PM
  3. Array Sorting Algorithms IV
    By whitey6993 in forum C Tutorials
    Replies: 3
    Last Post: 03-30-2010, 10:30 AM
  4. Array Sorting Algorithms II
    By whitey6993 in forum C Tutorials
    Replies: 4
    Last Post: 12-30-2008, 10:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

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