Re: Help me with references



Masamunexiii wrote:

> i am working on bubblesort method and the swap method is giving trouble
> because the values are being change,there are byval. So i looking for
> a way to make swap work and change the values of the arguments.

Others have pointed you in the right direction to get your code to work, but
I have to ask, "Do you really want to implement bubble sort?"

If this is just a learning exercise then that's great, but if you really
want to sort something there really isn't ever a good use for bubble sort.
You should probably let Java do the sorting for you unless you have a
reason to use a specific algorithm. That algorithm will never be bubble
sort.

--
Kenneth P. Turvey <kt@xxxxxxxxxxxxxxxxxx>
.



Relevant Pages

  • Re: fast stable sort
    ... because bubble sort marches up and down consecutive RAM ... entire array 2*n times, n times each direction, swapping the ... left-most and right-most parts of the array in and out with each ...
    (comp.programming)
  • Re: Bubble Sort in C
    ... a> I will not use in the code I write for my employer. ... a> algorithm in Ullman's book is insertion sort:) ... Bubble sort is an excellent first sort to teach because even a beginner ...
    (comp.lang.c)
  • Re: sort functions in python
    ... bubble sort. ... you didn't read the post you're replying to? ... I responded to a specific point about combsort being called bubble ...
    (comp.lang.python)