GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Bubble + Merge Sorts

Holly Howell Computing GCSE Englisch

Inhalt der Mindmap

Bubble + Merge Sorts

  1. bubble

    • A bubble sort algorithm goes through a list of data a number of times, comparing two items that are side by side to see which is out of order. It will keep going through the list of data until all the data is sorted into order. Each time the algorithm goes through the list it is called a ‘pass’.
    • Imagine that you have a list of people who you want to sort by age, from youngest to oldest. A bubble sort can do this. The list of ages is: 41, 15, 17, 32, 18, 28, 77 and 54 First pass The highlighted numbers are the numbers that are being compared. 41, 15, 17, 32, 18, 28, 77, 54 This is the list before it is sorted. 41, 15, 17, 32, 18, 28, 77, 54 The first two numbers are compared. 15 is smaller than 41 so they switch places. 15, 41, 17, 32, 18, 28, 77, 54 The next two numbers are compared. 17 is smaller than 41 so they switch places. 15, 17, 41, 32, 18, 28, 77, 54 The next two numbers are compared. 32 is smaller than 41 so they switch places. 15, 17, 32, 41, 18, 28, 77, 54 The next two numbers are compared. 18 is smaller than 41 so they switch places. 15, 17, 32, 18, 41, 28, 77, 54 The next two numbers are compared. 28 is smaller than 41 so they switch places. 15, 17, 32, 18, 28, 41, 77, 54 The next two numbers are compared. 41 is smaller than 77 so no change occurs
  2. merge

    • Merge sort is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log n), it is one of the most respected algorithms. Merge sort first divides the array into equal halves and then combines them in a sorted manner.
    • An example of merge sort. First divide the list into the smallest unit (1 element), then compare each element with the adjacent list to sort and merge the two adjacent lists. ... In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm.

Informationen

Beschreibung
GCSE Computing Mindmap am Bubble + Merge Sorts, erstellt von Holly Howell am 29/01/2019.
Erstellt von
Holly Howell
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck