Search
Create
Log in
Sign up
Log in
Sign up
y9 Computing - 2.1b Standard Algorithms (Search/Sort)
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (20)
Bubble Sort
A Sorting Algorithm that passes over the list many times, compares each pair of adjacent items and swaps them if they are in the wrong order.
Merge Sort
A sorting algorithm that sorts partial lists then merges them together.
Insertion Sort
A sorting algorithm where each element in the list is inserted into the correct place in the list one at a time.
Sort Algorithm
Any algorithm that describes how to sort data, examples are Bubble, Insertion and Merge
Ascending
Rising, going from smallest to largest
Descending
Falling, going from largest to smallest
Array
A data structure that can hold many items of the same type of data e.g. names, account numbers - in pseudocode :
names = ["Jon", "Anya", "Zork"]
for
a Python keyword that starts a loop
if
a Python keyword that makes a selection
Search Algorithm
A structured process that finds a target in a set of data
Linear Search
A search algorithm which looks at every element in turn until it finds the target, it is slow but works even on unsorted data
Binary Search
A search algorithm that divides the search space in half each time until it finds the target, faster than linear but requires the array to be sorted.
a[n]
Python code that represents the nth member of an array called a.
Variable
A named value in a computer program that can be changed by the program code as it runs. "temp" and "num" are examples in our bubble sort program.
Target
The item we are searching for in a search algorithm.
Mid point
used in a binary search
Right hand side of the array including mid point
Discarded if the binary search target value is lower than the value we are comparing it to (the mid point)
Left hand side of the array including mid point
Discarded if the binary search target value is higher than the value we are comparing it to (the mid point)
best-case scenario for binary search
target value is in mid point of the array
best-case scenario for linear search
target value is in the first position of the array
OTHER SETS BY THIS CREATOR
Binary addition
15 Terms
Mhighmore
TEACHER
Binary Units
20 Terms
Mhighmore
TEACHER
y9 Algorithms: Linear Search, Binary Search, Bubble Sort, Insertion Sort
21 Terms
Mhighmore
TEACHER
Knowledge Organiser 20 Preventing cyber security threats & encryption
10 Terms
Mhighmore
TEACHER
;