Big O Notation Flashcards

(37 cards)

1
Q

linear search best case time complexity

A

O(1)

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

linear search average case time complexity

A

O(n)

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

linear search worst case time complexity

A

O(n)

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

Binary search array best case time complexity

A

O(1)

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

Binary search array average case time complexity

A

O(log n)

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

Binary search array worst case time complexity

A

O(log n)

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

Binary search tree best case time complexity

A

O(1)

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

Binary search tree average case time complexity

A

O(log n)

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

Binary search tree worst case time complexity

A

O(n)

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

Hashing best case time complexity

A

O(1)

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

Hashing average case time complexity

A

O(1)

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

Hashing worst case time complexity

A

O(n)

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

Breadth/depth-first of graph best case time complexity

A

O(1)

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

Breadth/depth-first of graph average case time complexity

A

O(V+E)

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

Breadth/depth-first of graph worst case time complexity

A

O(V^2)

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

Bubble sort best case time complexity

17
Q

Bubble sort average case time complexity

18
Q

Bubble sort worst case time complexity

19
Q

Bubble sort space complexity

20
Q

Insertion sort best case time complexity

21
Q

Insertion sort average case time complexity

22
Q

Insertion sort worst case time complexity

23
Q

Insertion sort space complexity

24
Q

Merge sort best case time complexity

25
Merge sort average case time complexity
O(n log n)
26
Merge sort worst case time complexity
O(n log n)
27
Merge sort space complexity
O(n)
28
Quick sort best case time complexity
O(n log n)
29
Quick sort average case time complexity
O(n log n)
30
Quick sort worst case time complexity
O(n^2)
31
Quick sort space complexity
O(log n)
32
Meaning of O(1)
Constant same time regardless of size of data set
33
Meaning of O(log n)
Logarithmic halves the data set in each pass opposite of exponential directly proportional to logarithmic result of input size
34
Meaning of O(n)
Linear time increases proportional to size of data set
35
Meaning of O(n log n)
Linearithmic
36
Meaning of O(n^2)
Polynomial time increases proportional to square of size of data set nested loops
37
Meaning of O(2^n)
Exponential doubles with each addition to data set in each pass opposite to logarithmic