daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Bubble Sort Psuedocode
  2.  
  3. Int array[10];  create an array of 10 intergers and load with data
  4. Move 0 to x
  5. Move 0 to y
  6. [Improved] Move 1 to count
  7. Perform loop1 until x > 9 [Improved] OR count = 0
  8.     [Improved] Move 0 to count
  9.     Perform loop2 until y > 8
  10.         Compare array[y] to array[y+1]
  11.         If array[y] is larger than array[y+1]
  12.             [Improved] Add 1 to count
  13.             Move array[y] to hold
  14.             Move array[y+1] to array[y]
  15.             Move hold to array[y+1]
  16.             End if
  17. Increase y by 1
  18. End loop2
  19. [Improved]
  20. Increase x by 1
  21. Move 0 to y
  22. Subtract 1 from top
  23. End loop1
RAW Paste Data
Top