Sorting algorithms 1

  • Created by: Tomiwaq
  • Created on: 19-04-19 14:27
View mindmap
  • Sorting algorithms
    • Bubble sort
      • Compares pairs of items
      • Sorts unordered lists
      • Slow
      • 1) Look at first 2 items in list
      • 2) If they're in the right order do not change. If not swap them
      • 3) Move on to next pair of items
      • 4) Repeat 3) until you get to end of list
      • 5) Repeat 1) - 4) until there are no more swaps to complete
    • Advantages to bubble sort
      • It's simple
      • It's efficient in ordered lists
      • Does not use very much memory
    • Disadvantages to bubble sort
      • It's an inefficient way to sort a list
      • Does not cope well with large lists

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Algorithms resources »