dcsimg

Search:

Type: Posts; User: OptionBase1

Search: Search took 0.01 seconds.

  1. Re: [STUCK] Bubble sort algorithm on VB (console)

    Your code:


    Do Until swapped = True

    Pseudocode:


    REPEAT
    ...
  2. Re: [STUCK] Bubble sort algorithm on VB (console)

    Please use the Code tag around code you post, since it preserves indentation.

    For comparison, again, here is the pseudocode:



    REPEAT
    swapped = false
    FOR n =1 TO LEN(list)-1
    ...
  3. Re: [STUCK] Bubble sort algorithm on VB (console)

    Also you should be careful when you are mixing value types. I recommend using Option Strict On to force you to assign proper value types to variables. Note that the below is not what is causing...
  4. Re: [STUCK] Bubble sort algorithm on VB (console)

    In your other thread on bubble sorts, you posted this pseudocode:


    FUNCTION bubblesort(list)

    REPEAT
    swapped = false
    FOR n =1 TO LEN(list)-1
    IF list[n-1] > list[n] THEN
    ...
Results 1 to 4 of 4



Featured


Click Here to Expand Forum to Full Width