Thread: sorting a linked list using merge sort question..

  1. #16
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Adak View Post
    Big O notation is a good overall guide, but it's not based on actual run-time. If you want good results for your program, with your target computer, and your typical data, then that's what you should test with, and use actual run-time as your guide.
    Ditto that. Here's some thoughts I had about the significance of the big O notation after doing this:

    How to sort a simple linked list using swap-sort method

    It mostly has to do with the distinction between an iteration and comparison, which normative presentations of big O notation do not take into account. Gosh what a funny kid I was 6 months ago
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  2. #17
    Banned
    Join Date
    Aug 2009
    Posts
    43
    does the code of split and merge are correct?

  3. #18
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by kakaroto View Post
    does the code of split and merge are correct?
    Does it successfully sort the array?
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with linked list sorting function
    By Jaggid1x in forum C Programming
    Replies: 6
    Last Post: 06-02-2009, 02:14 AM
  2. Linked list question
    By caduardo21 in forum C Programming
    Replies: 2
    Last Post: 01-30-2005, 01:29 AM
  3. linked list stack question
    By Drew in forum C++ Programming
    Replies: 2
    Last Post: 09-11-2003, 05:05 AM
  4. Linked List
    By jpipitone in forum C Programming
    Replies: 4
    Last Post: 03-30-2003, 09:27 PM
  5. Quick question on sorting a singly linked list
    By Ham in forum C++ Programming
    Replies: 1
    Last Post: 10-08-2001, 11:26 PM