Algorithm Efficiency Flashcards

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/26

flashcard set

Earn XP

Description and Tags

Flashcards covering key concepts in algorithm efficiency and computational complexity.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

27 Terms

1
New cards

Algorithm Efficiency

A measure of how efficiently an algorithm utilizes resources such as time and space.

2
New cards

O(n) Complexity

A loop that performs a fixed number of operations n times.

3
New cards

Worst-Case Efficiency

The maximum number of operations required for inputs of a given size.

4
New cards

Average-Case Efficiency

The average number of operations required for inputs of a given size.

5
New cards

Best-Case Efficiency

The fewest number of operations required for inputs of a given size.

6
New cards

Computational Complexity

A measure of the effort needed to apply an algorithm, often in terms of time and space.

7
New cards

Time Complexity

A measure of the time required to execute an algorithm.

8
New cards

Space Complexity

A measure of the amount of memory required by an algorithm.

9
New cards

Asymptotic Complexity

A simplified way to represent algorithm efficiency, focusing on how performance scales with input size, denoted as Big O.

10
New cards

Big O Notation

Used to give an asymptotic upper bound for a function, representing the upper bound of an algorithm's complexity.

11
New cards

Linear Relationship (Complexity)

If t=cn, then an increase in the size of data increases the execution time by the same factor

12
New cards

Logarithmic Relationship (Complexity)

If t=log2n then doubling the size ‘n’ increases ‘t’ by one time unit.

13
New cards

Running Time

The number of steps an algorithm requires to solve a specific problem.

14
New cards

Upper Bound

The maximum number of steps an algorithm requires.

15
New cards

Lower Bound

A certain number of steps that every algorithm has to execute at least in order to solve the problem.

16
New cards

Quadratic Equation Complexity

O(n^2) - Number of operations proportional to the square of the size of the input data

17
New cards

Cubic Equation Complexity

O(n^3) - Number of operations proportional to the cube of the size of the input data

18
New cards

Exponential Equation Complexity

O(2^n) - Exponential number of operations, grows very fast.

19
New cards

Constant Complexity

O(1) - Number of operations does not depend on the size of the problem.

20
New cards

Calculating Average Case Complexity

Calculating approximations in the form of big-O, big-Ω and big-Θ can simplify the task.

21
New cards

Big-Ω

Represents an algorithm's lower bound.

22
New cards

Big-Θ

Means tight bound.

23
New cards

Logarithmic Loops

f(n) = log2 n ; where 2 is the multiplier/divisor

24
New cards

Linear Loops

f(n) = n

25
New cards

Nested Loops

Iterations = outerloop iterations x inner loop iterations

26
New cards

Linear Logarithmic

f(n) = n log2 n

27
New cards

Quadratic

f(n) = n2