Algorithms (OCR A-Level Computer Science): Flashcards

📚Flashcards
Algorithm Efficiency using Big O Notation
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

12 cards from this deck

Show

What does Big O notation describe?

Algorithm efficiency: upper bound of growth rate, worst-case performance

Time complexity definition

How execution time increases with input size

Space complexity definition

How memory usage increases with input size

O(1)O(1) complexity characteristic

Performance unaffected by input size

Algorithm example with O(1)O(1)

Accessing an array element

O(logn)O(\log n) complexity growth

Performance grows logarithmically with input size

Algorithm example with O(logn)O(\log n)

Binary search

O(n)O(n) complexity growth

Performance grows linearly with input size

Algorithm example with O(n2)O(n^2)

Bubble sort

O(2n)O(2^n) complexity growth

Performance doubles with each additional input element

Big O of nested loop over nn

O(n2)O(n^2)

Big O simplification rule

Drop lower-order terms and constants

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Quizzes by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.