Algorithms (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
12 cards from this deck
ShowHide
Practise the cards
12 cards from this deck
What does Big O notation describe?
What does Big O notation describe?
Algorithm efficiency: upper bound of growth rate, worst-case performance
Time complexity definition
Time complexity definition
How execution time increases with input size
Space complexity definition
Space complexity definition
How memory usage increases with input size
complexity characteristic
complexity characteristic
Performance unaffected by input size
Algorithm example with
Algorithm example with
Accessing an array element
complexity growth
complexity growth
Performance grows logarithmically with input size
Algorithm example with
Algorithm example with
Binary search
complexity growth
complexity growth
Performance grows linearly with input size
Algorithm example with
Algorithm example with
Bubble sort
complexity growth
complexity growth
Performance doubles with each additional input element
Big O of nested loop over
Big O of nested loop over
Big O simplification rule
Big O simplification rule
Drop lower-order terms and constants
