Runtimes Flashcards

1
Q

Bubble Sort Best Case

A

O(n)

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

Bubble Sort Average Case

A

O(n^2)

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

Bubble Sort Worst Case

A

O(n^2)

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

Binary Search Best Case

A

O(1)

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

Binary Search Average Case

A

O(n^2)

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

Binary Search Worst Case

A

O(n^2)

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

Insertion Sort Best Case

A

O(n)

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

Insertion Sort Average Case

A

O(n^2)

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

Insertion Sort Worst Case

A

O(n^2)

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

Selection Best Case

A

O(n^2)

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

Selection Sort Average Case

A

O(n^2)

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

Selection Sort Worst Case

A

O(n^2)

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

Quick Sort Best Case

A

O(nlgn)

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

Quick Sort Average Case

A

O(nlgn)

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

Quick Sort Worst Case

A

O(n^2)

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

Merge Sort Best Case

A

O(nlgn)

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

Merge Sort Average Case

A

O(nlgn)

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

Merge Sort Worst Case

A

O(nlgn)

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

Dynamic Array AddBack Best Case

A

O(1)

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

Dynamic Array AddBack Average Case

A

O(1)

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

Dynamic Array AddBack Worst Case

A

O(n)

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

Dynamic Array RemoveBack Best Case

A

O(1)

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

Dynamic Array RemoveBack Average Case

A

O(1)

24
Q

Dynamic Array RemoveBack Worst Case

A

O(n)

25
Q

Open Addressing Functions Best Case

A

O(1)

26
Q

Open Addressing Functions Average Case

A

O(1)

27
Q

Open Addressing Functions Worst Case

A

O(n)

28
Q

Separate Chaining Best Case

A

O(1)

29
Q

Separate Chaining Average Case

A

O(1)

30
Q

Separate Chaining Worst Case

A

O(n)

31
Q

Binary Search Tree Find/Insert Best Case

A

O(1)

32
Q

Binary Search Tree Find/Insert Average Case

A

O(lgn)

33
Q

Binary Search Tree Find/Insert Worst Case

A

O(n)

34
Q

Static list insert front/back

A

O(n)

35
Q

Static list remove front/back

A

O(n)

36
Q

Singly-linked circular list w/ head/tail pointers insert front

A

O(1)

37
Q

Singly-linked circular list w/ head/tail pointers insert back

A

O(1)

38
Q

Singly-linked circular list w/ head/tail pointers remove front

A

O(1)

39
Q

Singly-linked circular list w/ head/tail pointers remove back

A

O(n)

40
Q

Heap insert

A

O(lgn)

41
Q

Heap sort

A

O(nlgn)

42
Q

Heapify

A

O(n)

43
Q

Heap Extract

A

O(lgn)

44
Q

BFS Adj Matrix

A

O(V^2)

45
Q

DFS Adj Matrix

A

O(V^2)

46
Q

Dijkstras Adj Matrix

A

O(V^2)

47
Q

BFS Adj List

A

O(V+E)

48
Q

DFS Adj List

A

O(V+E)

49
Q

Dijsktras Adj List

A

O(ElgV)

50
Q

Prim’s Adj Matrix

A

O(V^2)

51
Q

Prim’s Adj List

A

O(ElgV)

52
Q

Kruskal’s Disjointed Set

A

O(ElgV)

53
Q

Union by Height/Size Constructor

A

O(n)

54
Q

Union by Height/Size Merge

A

O(1)

55
Q

Union by Height/Size Find

A

O(h)->O(lgn)

56
Q
A