GoConqr has a new look! Let us know what you think.

Flashcards

Computing flash cards

Luke Mark Computing Year 9 English 8 cards

Cards in this deck (8)

  1. 1What is a Bubble sort? When is a Bubble sort used How do you do a Bubble sort?A bubble sort is a sorting algorithm which is coded with the main goal of putting an array of data into the correct numerical or alphabetical order.
    A Bubble sort is mainly used for small arrays of numbers as it is much simpler to code than a merge sort and a bubble sort takes ages to order large arrays.
    A Bubble sort is where two numbers are compared, if they are in the incorrect order they are swapped. From there you keep going until you reach the end of the line. You then label that as pass 1 and continue from the start again until they are completely sorted into order.
    An example of a bubble sort would be;
    2,3,4,5,1
    Pass 1: 2,3,4,1,5
    Pass 2: 2,3,1,4,5
    Pass 3: 2,1,3,4,5
    Pass 4: 1,2,3,4,5
  2. 2What is a linear search? When is a linear search used? How do you do a linear search?A linear search is a searching algorithm which has a sole goal of finding a certain piece data from an array of data.
    A Linear search is usually used for smaller arrays of data as it is quite simple to code and is really slow for large arrays of data.
    A linear search is where there is an array of numbers, and each data is checked
    Individually until what they are looking for is found. For example in this array of numbers i want to find the number 42:
    10,25,36,42,64,86
    This would take 4 searches as first it looks at the 10. Then it looks at the 25 and so on until the number 42 is found
  3. 3What is a Binary search? When is a Binary search used How do you do a Binary search?A Binary search is also a searching algorithm which has a goal of finding a piece of data from an array of data.
    Binary searches are usually used for larger arrays of data as it is quicker than a linear search.
    A binary search is where the array of numbers is split in half. If what you are looking for is higher than the number in the middle, you cross out anything below it. You repeat until the number is found.
    For example in this array we are again looking for 42:
    42,54,(64),66,87,98
    The midpoint could be either 64 or 66. We chose which one we determine as the middle point. From here you repeat until 42 is found
    42,54| (64),66,87,98
    (42),54
  4. 4What is a Merge sort? When is a Merge sort used? How do you do a Merge sort?A Merge sort is an algorithm that is used to put an array of data into numerical or alphabetical order.
    A Merge sort is usually used for sorting larger arrays of data as it is very efficient with long arrays.
    A merge sort is done by splitting the array of numbers in half until they are singular data. From there you put them into pairs in the right order. Here is an example.
    65,3,6,23,63,86,98,53
    From here we split them in half:
    [65,3,6,23] [63,86,98,53]
    and half again until they are singular
    [65,3] [5,23] [63,86] [98,53]
    [63] [3] [5] [23] [63] [86] [98] [53]
    From here we put them back into the larger array of order by pairing them back up, however we sort the data into numerical order:
    [3,65] [5,23] [63,86] [53,98]
    [3,6,23,65] [53,63,86,98]
    [3,6,23,53,63,65,86,98]
  5. 5Advantages of a Bubble sort Disadvantages of a Bubble sortAdvantages of a bubble sort:
    Easier to code than a merge sort.
    Efficient with short arrays of data.
    Disadvantages of a bubble sort:
    Slow with larger arrays of data.
  6. 6Advantages of a Merge sort Disadvantages of a Merge sortAdvantages of a merge sort:
    More efficient with larger arrays of data.
    Disadvantages of a merge sort:
    Slower than a bubble sort with short arrays of data.
    Takes longer to code than a bubble sort.
  7. 7Advantages of a Linear search Disadvantages of a Linear searchAdvantages of a linear search:
    A linear search is efficient with shorter arrays of data.
    A linear search is easier and quicker to code than a binary search
    Disadvantages of a Linear search:
    A Linear search is slow for longer arrays of data.
    As a worst case scenario, the Linear search would have to go through every number until the one it needs is found.
  8. 8Advantages of a Binary search Disadvantages of a Binary searchAdvantages of a Binary search:
    A Binary search is efficient with longer arrays of data.
    Disadvantages of Binary search:
    The array of data must be in numerical or alphabetical order.
    A Binary search takes longer and is more difficult to code.
    A Binary search is inefficient for shorter arrays of data

Information

Description
Year 9 Computing Flashcards on Computing flash cards, created by Luke Mark on 18/07/2018.
Created by
Luke Mark
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?