Results 1 to 3 of 3

Thread: Bubble sort in vb6

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Bubble sort in vb6

    i have been teaching myself c++. what i ended up doing was translate all the c++ codes in the book to vb6 .anywas, here is a small exmple of bubble sort. just sort given numbers in order.

    for this purpose, there is a prompt for the size of myArr, it is the number of numbers to sort.

    WARNING:Totally undocumented and hopeless way of coding. dont follow this example of coding for professional purposes.....
    Attached Files Attached Files

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    UK
    Posts
    417

    Re: Bubble sort in vb6

    Your Bubble sort is in fact a "Selection Sort" that works by selecting the smallest item remaining in the list and swapping it with the item at the next position.

    in fact your implantation is fast and more efficient then a bubble sort as it the most slowest one.

    anyway nise code.
    When your dreams come true.
    On error resume pulling hair out.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: Bubble sort in vb6

    thanx dreamvb. i'm not much good at naming algorithms and i dont look forward to polish the code in anyways. so if anybody wants to polish the code and put in comments, they're welcome to do so.....

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