Bubble and Insertion sort

Descrição

A level Computing Mapa Mental sobre Bubble and Insertion sort, criado por Warren Jeffreys em 21-01-2017.
Warren  Jeffreys
Mapa Mental por Warren Jeffreys, atualizado more than 1 year ago
Warren  Jeffreys
Criado por Warren Jeffreys mais de 7 anos atrás
48
0

Resumo de Recurso

Bubble and Insertion sort
  1. Bubble sort
    1. Starts by comparing the first two elements of an array and swapping if necessary, from lowest to highest as an example.
      1. Therefore if the first element is larger than the second, you will need to switch them.
        1. Once it has completed the first comparison, it will move onto comparing the second and third element and repeating the process.
          1. Once it has been compared from left to right, it may need to go through the loop again as some elements will still be displaced.
        2. It goes through the whole array from left to right and repeats this process until all the elements are in the correct position.
        3. Insertion sort
          1. Insertion sort starts off by looking at the first two elements and comparing them to decide whether to move them or keep them in the same place; depending on if it is lowest to highest or not.
            1. After the first two are compared, then the third element is selected and goes through all the elements to the left of it to decide where it will go.
              1. For example, if you have the number 1 in the third position, then 12 in the second and 3 in the first. You would go past 12 as it is smaller, then past 3 as it is also smaller. Therefore would be in the correct position without having to go through the loop multiple times it goes through only once.
            2. Only needs to do one loop to complete the process

            Semelhante

            A level Computing Quiz
            Zacchaeus Snape
            Types and Components of Computer Systems
            Jess Peason
            Input Devices
            Jess Peason
            Output Devices
            Jess Peason
            Computing
            Kwame Oteng-Adusei
            Pack of playing cards answer
            Karl Taylor
            Code Challenge Flow Chart
            Charlotte Hilton
            Computing Hardware - CPU and Memory
            ollietablet123
            Computer Systems
            lisawinkler10
            Computer science quiz
            Ryan Barton
            Input, output and storage devices
            Mr A Esch