0 results for
ICT
Computing
Responsive image

Linear and Binary Search

Overview
Flight Path
Learning Objectives
0 results forGuest
IDSkill_name
 3.1.3.1 I can understand and explain how the linear search algorithm works.
 3.1.3.2 I can understand and explain how the binary search algorithm works.
 3.1.3.3 I can compare and contrast linear and binary search algorithms.

🏁 Learning Objective Linear and Binary Search


Lesson Video

Lesson Tasks

  • Watch the Lesson video
    Make notes on your notes sheet.
  • Read the lesson notes
    Make notes on your notes sheet.
  • Complete the learning activities
    Make any notes on your notes sheet.
  • Check the Learning outcomes
    Update your learning objectives

Searching


Searching for information is one of the main tasks of any computer system. The speed at which information can be found is also very important, especially in real time systems where the data has to be found and updated very quickly.

Linear Search

A linear search checks each item in a list one at a time, without jumping over item, or to any item.

Linear Search to find an element "K" in a sorted list.

Linear search

  1. The worst case complexity is O(n), sometimes known an O(n) search
  2. Time taken to search elements keep increasing as the number of elements are increased.

break

Binary Search

In computer science, binary search, also known as half-interval search or logarithmic search, is a search algorithm that finds the position of a target value within a sorted array. It compares the target value to the middle element of the array; if they are unequal, the half in which the target cannot lie is eliminated and the search continues on the remaining half until it is successful.

decomposition

Binary search runs in at worst logarithmic time, making O(log n) comparisons, where n is the number of elements in the array and log is the binary logarithm.

break

Searching - Comparing a linear and binary search

break

Learning Outcomes

  • I can explain how the linear search algorithm works.
  • I can understand and explain how the binary search
    algorithm works.
  • I can compare and contrast linear and binary search
    algorithms.


0 results forGuest
Recent Comments

Teacher Date: 2025-10-27


Guest