Back to marketplace

Unit 12 Algorithms

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

What is an algorithm?

Back (Answer)

A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer

#2
Front (Question)

What are some examples of computational algorithms? (3)

Back (Answer)

• Binary search • Insertion Sort • Bubble Sort

#3
Front (Question)

What kind of problems are solved by Algorithms? (6)

Back (Answer)

• Routing problems • Timetabling aircrafts • Searching information on the Internet • Encrypting communications • Sorting large amounts of data • Writing a compiler program

#4
Front (Question)

What are the properties of a good algorithm? (5)

Back (Answer)

• Has clear and well stated steps • Should allow for invalid inputs • Must terminate at some point • Should be executed efficiently and in as few steps as possible • Must be easy to understand and modify by other people

#5
Front (Question)

What is a good basic measure of Efficiency?

Back (Answer)

The number of assignment statements

#6
Front (Question)

What is a Linear Function?

Back (Answer)

A function that takes the form of f(n) = an + b where a and b are constants

#7
Front (Question)

What is a Quadratic Function?

Back (Answer)

A function that takes the form of f(n) = an^2 +bn + c where a, b and c are constants

#8
Front (Question)

What is a Logarithmic Function?

Back (Answer)

A function that takes the form of f(n) = alog2n (that’s a little low 2)

#9
Front (Question)

What is the Logarithm of a number?

Back (Answer)

The power to which the base must be raised to make it equal to the number

#10
Front (Question)

What is Big-O Notation?

Back (Answer)

A measure of the time complexity of an algorithm. It is a useful approximation of the time taken to execute an algorithm for a given number of items in a data set

#11
Front (Question)

How does an algorithm of time complexity O(n) increase?

Back (Answer)

Linearly e.g. 10,000 items will take approximately twice as long as 5,000 items to process

#12
Front (Question)

How does a Divide and Conquer Algorithm work?

Back (Answer)

It halves the size of the problem at each pass

#13
Front (Question)

What is a Permutation?

Back (Answer)

A permutation of n items is the number of ways the n items can be arranged

#14
Front (Question)

What are the types of Permutation? (2)

Back (Answer)

• Repetition allowed • No repetition allowed

#15
Front (Question)

What is Big-O notation used for?

Back (Answer)

Describing the time complexity of different algorithms

#16
Front (Question)

What happens in a Linear Search?

Back (Answer)

Each item is checked one after another until the desired item is found

#17
Front (Question)

What is the worst case scenario of a Linear Search?

Back (Answer)

Every item is checked

#18
Front (Question)

What happens in a Binary Search? (4)

Back (Answer)

• Middle item is examined • If it is the desired item, the item is found • If not, depending on whether the current item is higher or lower than the desired item, half the list is eliminated • This is repeated until the item is found or proved to not be in the list

#19
Front (Question)

What do Binary Trees do?

Back (Answer)

Hold items in a way that can be searched quickly and easily

#20
Front (Question)

What must be true for a Binary Search to take place?

Back (Answer)

The list must be sorted

#21
Front (Question)

What is the time complexity for a Binary Search and Binary Tree?

Back (Answer)

O(log n)

#22
Front (Question)

What is the time complexity for a Linear Search?

Back (Answer)

O(n)

#23
Front (Question)

When is a Bubble Sort best used?

Back (Answer)

When there are only a small number of items

#24
Front (Question)

What happens in a Bubble Sort?

Back (Answer)

n-1 passes are made through the array, with each adjacent item being compared with the adjacent item and swapped if necessary