Data Structures Flashcards

1
Q

Time Complexity

A

Amount of time it takes to run an algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Space Complexity

A

Amount of memory taken up by a program to run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Asymptotic Analysis

A

Evaluating performance of an algorithm in terms of input size and its increase
- We don’t actually see how fast it can run but rather how it increases with different inputs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Big O

A

Upper bound of the algoirthm (worst case)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Omega

A

Lower bound of the Algorithm
Best case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Theta

A

Average case

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Rules of Big O
- Execution time of statements

A
  • Return statement takes 1 unit of time
  • Assignment operation/arithmetical operation all take 1 unit of time
  • Drop lower order terms/constants
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

O(1)

A

Constant Time
- Simple instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

O(n)

A

Linear Time
- if input is based on n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

O(n^2)

A

Polynomial Time
- When an algorithm is n*n = n^2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly