Thread: bubble sort

  1. #1
    Registered User
    Join Date
    Mar 2010
    Posts
    94

    Unhappy bubble sort

    Do you have any idea how to implement bubble sort without using arrays?

    Thanks a lot!

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    There is very little reason to recommend a bubble sort, for any sorting job.

    What do you need to sort, and what kind of data structure is it in, and what are your big 0 complexity requirements?

    Questions which don't have specifics included in them, are almost impossible to answer in a meaningful way, on a forum.

  3. #3
    Registered User
    Join Date
    Jul 2009
    Location
    Croatia
    Posts
    272
    Using structs, i suppose. Then writing your own specialized bubble sort for the particular structure used.

  4. #4
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Yes I certainly do;
    and no I don't mean the crappy cheating inefficient way of doing it by treating the list as though it was an array.

    Glad I could answer your question ... Next!
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-13-2009, 03:25 PM
  2. My bubble sort only sorts once
    By Muller in forum C Programming
    Replies: 8
    Last Post: 03-27-2009, 04:36 PM
  3. How do I bubble sort alphabetically?
    By arih56 in forum C++ Programming
    Replies: 4
    Last Post: 02-27-2008, 02:30 AM
  4. Bubble Sort... which type?
    By gflores in forum C++ Programming
    Replies: 8
    Last Post: 08-15-2004, 04:48 AM
  5. Bubble Sort, Qucik Sort
    By insomniak in forum C Programming
    Replies: 2
    Last Post: 03-15-2003, 04:54 PM