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

Mind map

2.1linear and binary searches

Sam Power English

Map content

2.1linear and binary searches

  1. linear search

    • each item in the list is checked in order
    • the binary search only works if data is in order
    • check 1st value
      • if it is the value you are looking for celebrate and stop
        • ELSE- Move to and check the next value
          • repeat until find value
  2. Binary searches

    • the list needs to bE in order
    • take the middle value
    • compare to the value you are looking for
    • if it is the value you are looking for celebrate and STOP
      • if it is smaller than the one you are looking for, take the values to the right of the middle value.
    • ELSEIF- if it is larger than the one you are looking for
      • take the values to the left of the middle value
  3. Bubble sort

    • bubble sorting - moving through a list repeatedly, swapping elements that are in the wrong order
    • 1. take the 1st element and second element from the list
      • 2. compare them
        • 3. if element 1 >element 2 then - swap them
          • 4. ELSE-do nothing

Information

Description
Mind Map on 2.1linear and binary searches, created by Sam Power on 10/01/2019.
Created by
Sam Power · Jan 2019
Updated
Jan 10, 2019
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?