top of page
Image by Alexander Grey

Linear & Binary Search

Unit 3 Summary - part 4

Image by Nareeta Martin

Linear Search

​

Searches from the beginning, one by one

​

  • Advantage: Can search unsorted list.

  • Disadvantage: Slow to search if there are many items in the list.

Image by Annie Spratt

If Linear Search were made into a Spanish dance,
it would look like this:

Image by Kenrick Mills

Binary Search

Searches from the middle and ignores the rest of the list
(if it's
lower/higher than what we're looking for)

​
​
  • Advantage: Very fast to search if we have so many items (because it ignores the rest if it's lower/higher than what we're looking for).

  • Disadvantage: The list needs to be sorted first. Not so fast if we only have few items in the list.
     

Image by Scott Webb
Image by Krystal Ng
Image by Adrian Infernus

If Binary Search were a flamenco dance, it would be entertaining:

Image by Alexander Grey

Oxford AQA IGCSE Specimen paper

Image by J Lee

10.

Figure 8 shows a list of names stored in an array called Names.

 

Figure 8

 

Names

Binary Linear Search1 AQA IGCSE Specimen.png

10.1.

If a linear search is being used to try and find the name “Ray” in the Names array how many comparisons will be made? [1 mark]

​

__________________________________________________________________________________

​

Answer:

7

Image by Pawel Czerwinski

10.2.

If a binary search is being used to try and find the name “Ray” in the Names array how many comparisons will be made? [1 mark]

​

__________________________________________________________________________________

​

Answer:

2

​

​

​

10.3.

For each statement shade in a box to show if the statement is true or false.

​

 Statement

Binary Linear Search2 AQA IGCSE Specimen.png

Answers:

​

  • False;

  • False;

  • True;

  • False;

Image by Cyrus Crossan
Visconsio Nekoland Logo.jpg
PT. Visconsio Kaya Jaya Masyhur

© 2020-2023 by Miana Kitty

bottom of page