
TIME COMPLEXITY A LEVEL
Presentation
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
SAMANTHA NICOLE
Used 1+ times
FREE Resource
9 Slides • 0 Questions
1
TIME COMPLEXITY
2
What is time complexity
Time complexity is a measure of how the runtime of an algorithm increases with respect to the input size (n). It helps us evaluate the efficiency of an algorithm.
3
Common Types of Time Complexity:
Constant Time – O(1)
The execution time remains the same regardless of input size.
Example: Accessing an element in an array by index → arr[5]
4
The runtime grows slowly as the input size increases.
Example: Binary search (dividing the problem in half each step).
Linear Time – O(n
The runtime increases proportionally with the input size.
Example: Iterating through an array → for i in range(n)
Logarithmic Time – O(log n)
Types cont.......
5
The runtime grows proportionally to the square of the input size.
Example: Nested loops iterating through an array → for i in range(n): for j in range(n):
Quadratic Time – O(n^2)
The runtime is a combination of linear and logarithmic growth.
Example: Efficient sorting algorithms like Merge Sort and Quick Sort (average case).
Linearithmic Time – O(nlogn)
Types cont.......
6
The runtime grows slowly as the input size increases.
Example: Binary search (dividing the problem in half each step).
Linear Time – O(n
The runtime increases proportionally with the input size.
Example: Iterating through an array → for i in range(n)
Logarithmic Time – O(log n)
Types cont.......
7
The runtime grows extremely fast.
Example: Generating all possible permutations of n elements
Factorial Time – O(n!)
The runtime increases proportionally with the input size.
Example: Iterating through an array → for i in range(n)
Exponential Time – O(2^n)
Types cont.......
8
Big O Notation
Best Case: The minimum time required for execution.
Average Case: The expected time taken for random input.
Worst Case: The maximum time required (important for analysis).
9
TIME COMPLEXITY
Show answer
Auto Play
Slide 1 / 9
SLIDE
Similar Resources on Wayground
9 questions
Reading Strategies
Presentation
•
6th - 8th Grade
10 questions
Review & Summary Topic 1.1
Presentation
•
12th Grade
4 questions
Mengedit Foto dengan Photoshop
Presentation
•
12th Grade
7 questions
Connectors
Presentation
•
12th Grade
7 questions
6. Tạo biểu mẫu
Presentation
•
12th Grade
10 questions
CREDIT
Presentation
•
12th Grade
6 questions
How to collect Hair and Fiber Evidence
Presentation
•
12th Grade
10 questions
SEMBELIHAN, KORBAN DAN AKIKAH
Presentation
•
12th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for Computers
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
10 questions
Fire Prevention
Quiz
•
9th - 12th Grade
20 questions
Grammar
Quiz
•
9th - 12th Grade
16 questions
AP Biology: Unit 1 Review (CED)
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
11 questions
Expectations Review
Quiz
•
9th - 12th Grade
10 questions
Climate Change and Its Impact
Interactive video
•
9th - 12th Grade