Results 1 to 6 of 6
  1. #1
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default Sorting Comparisons

    Can someone point me to a good resource that would show me for instance, how many comparisons a sort will make if:

    The data is already ordered
    The data is in reverse order
    Etc

    Something comparing the different sorting algorithms, or can the above be derived from the computational complexity of the sorts in question.

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Why did you feel it necessary to re ask this question? If your previous question wasn't answered in the manner you wanted, perhaps you should have re specified the question.

    Also, why not think about it and explain to us what you think the answers are.

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    Double post. Please continue your discussion where you started it: Sorting Algorithms.

    In particular ask Junky if you don't understand his point that this is not a question about sorting. (I mean if the data were already sorted why would any comparisons be done?) Also you could ask if you are unsure of his use of the O() notation and its connection with your original question.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Agree with the above. Double posting and splitting discussion is unfair to the volunteers here and is bad even rude forum etiquette, especially when you posted this before replying to Junky.

    Does anyone see a reason not to lock this thread?

  5. #5
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

    Default

    partially because I've noticed that if the person helping me feels as though they have answered my originally question (and junky did a thorough job of answering the 1st question, as it was not very detailed), they do not post any more on that topic.

  6. #6
    fam2315 is offline Member
    Join Date
    Feb 2011
    Posts
    78
    Rep Power
    0

Similar Threads

  1. Multiple comparisons
    By malaguena in forum New To Java
    Replies: 4
    Last Post: 05-18-2011, 11:37 AM
  2. little help with sorting
    By drgnfire25 in forum New To Java
    Replies: 3
    Last Post: 01-15-2011, 09:23 PM
  3. Help in sorting
    By nn12 in forum New To Java
    Replies: 3
    Last Post: 01-08-2011, 06:15 PM
  4. Keeping track of Copies + Comparisons in Sort Methods
    By VinceGuad in forum New To Java
    Replies: 0
    Last Post: 03-12-2009, 04:07 AM
  5. sorting
    By jot321 in forum New To Java
    Replies: 18
    Last Post: 10-02-2008, 10:30 AM

Posting Permissions

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