Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Bubble sort

bubbleSort(array)
  swapped <- false
  for i <- 1 to indexOfLastUnsortedElement-1
    if leftElement > rightElement
      swap leftElement and rightElement
      swapped <- true
end bubbleSort
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #Bubble #sort
ADD COMMENT
Topic
Name
2+5 =