SuperExamSuperExam
Search papers…
Menu
DashboardBrowse papersRevision notesBooksSavedRevision packsMy progressAchievementsAI TutorMessages

Unlock worked solutions

Step-by-step answers by examiners. From €5/mo.

Try Premium free →
← Computer Science notes
Edexcel ·Computer Science·Cambridge AS & A Level Computer Science

Searching & Sorting Algorithms

16 min read

Linear and binary search, bubble, insertion and merge sort, their pseudocode and time complexities, and when to use each.

Linear search

Checks each element in turn until the target is found or the list ends. Works on any list (unsorted). Worst case O(n).

`` found ← FALSE i ← 1 WHILE i <= n AND found = FALSE DO IF list[i] = target THEN found ← TRUE ELSE i ← i + 1 ENDIF ENDWHILE ``

Viewing only

This content is free to read on superexams.com and cannot be printed or downloaded.

Read the full note — free

Create a free account to read this note in full. Every free account gets 2 complete revision notes — no card needed.

Sign up free →Log in

More Computer Science notes

Information Representation

Data Compression & Encryption

Communication & Networking

Hardware & the Processor