Save
Computer science OCR A Level
2.3.1 Analysis, design, comparison of algorithms
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Aanya Sinha
Visit profile
Cards (29)
What are the two main aspects to check when developing an algorithm?
Time Complexity
and
Space Complexity
View source
What does time complexity measure in an algorithm?
Time required to solve a
problem
View source
What notation is used to express time complexity?
Big-O notation
View source
What does Big-O notation indicate about an algorithm?
Upper limit of
time taken
View source
How does time complexity help in algorithm analysis?
Predicts time based on
input size
View source
What is the general form of Big-O notation?
O(n)
View source
What are the different types of Big-O notations and their descriptions?
O(1):
Constant
time complexity
O(n):
Linear
time complexity
O(n²):
Polynomial
time complexity
O(nn): Polynomial time complexity
O(2n):
Exponential
time complexity
O(log n):
Logarithmic
time complexity
View source
What does O(1) signify in time complexity?
Independent of
input size
View source
What does O(n) signify in time complexity?
Proportional to the number of
elements
View source
What does O(n²) signify in time complexity?
Proportional to the square of
elements
View source
What does O(2n) signify in time complexity?
Time doubles with each additional
item
View source
What does O(log n) signify in time complexity?
Increases at a smaller
rate
View source
How should one approach calculating time complexity?
Think logically through the
algorithm
View source
What are the key considerations when designing algorithms?
Complete the task
effectively
Optimize for
time complexity
Optimize for
space complexity
Balance between time and space complexities
View source
What should you focus on if processing speed is crucial in a large database?
Time complexity
View source
What should you focus on if you have ample processing power?
Space complexity
View source
How can you reduce space complexity?
Perform changes on
original
data
View source
How can you reduce time complexity?
Reduce the number of
embedded loops
View source
What is the Big-O notation for a linear search algorithm?
O(n)
View source
What is the Big-O notation for a binary search algorithm?
O(log n)
View source
What is the Big-O notation for a bubble sort algorithm?
O(n²)
View source
What does the linear search algorithm do?
Traverses
through every item one at a time
View source
What is the structure of the linear search algorithm?
Single
while loop
View source
What does the binary search algorithm do?
Splits the
list
into smaller lists
View source
What is the structure of the binary search algorithm?
While loop
with
midpoint
calculation
View source
What does the bubble sort algorithm do?
Evaluates pairs of
items
in the list
View source
What is the structure of the bubble sort algorithm?
While loop
with item comparisons
View source
How do the time complexities of linear search, binary search, and bubble sort compare?
Linear Search:
O(n)
Binary Search:
O(log n)
Bubble Sort:
O(n²)
View source
What are the key differences between time complexity and space complexity?
Time Complexity: Measures execution time
Space Complexity: Measures memory usage
Both are important for
algorithm
efficiency
View source