Complexity Analysis Flashcards

1
Q

Implementation of Binary Search Tree

A

Children Pointers

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

BST insert

A

0(n)

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

BST delete

A

O(n)

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

BST Search

A

O(n)

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

BST deleteMin

A

O(n)

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

BST deleteMax

A

O(n)

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

Building BST using insert

A

O(n^2)

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

Building optimal BST using dynamic programming algorithm

A

O(n^3)

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

Implementation of 2-3 Tree

A

Children/parent pointers

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

2-3 Tree insert

A

O(lgn)

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

2-3 Tree delete

A

O(lgn)

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

2-3 Tree search

A

O(lgn)

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

2-3 Tree findMin

A

O(lgn)

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

2-3 Tree findMax

A

O(lgn)

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

2-3 Tree buildTree

A

O(nlgn)

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

implementation of k-heap

A

array-based

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

k-heap insert

A

O(lgn)

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

k-heap general delete

A

O(n)

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

k-heap general search

A

O(n)

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

min k-heap deleteMax

A

O(n)

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

min k-heap deleteMin

A

O(lgn)

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

max k-heap deleteMax

A

O(lgn)

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

max k-heap deleteMin

A

O(n)

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

k-heap top-down build

A

O(nlgn)

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

k-heap bottom-up build

A

O(n)

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

k-heap frequent insertions

A

want larger k

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

k-heap frequent deletions

A

want smaller k

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

dual-heap insert

A

O(lgn)

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

dual-heap deleteMin

A

O(lgn)

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

dual-heap deleteMax

A

O(lgn)

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

dual-heap findMin

A

O(1)

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

dual-heap findMax

A

O(1)

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

dual-heap buildHeap

A

O(n)

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

implementation of minmax/maxmin heap

A

sequential array-based with root at A[1]

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

minmax/maxmin heap insert

A

O(lgn)

36
Q

minmax/maxmin deleteMin

A

O(lgn)

37
Q

minmax/maxmin deleteMax

A

O(lgn)

38
Q

minmax/maxmin top-down build

A

O(nlgn)

39
Q

minmax/maxmin bottom-up build

A

O(n)

40
Q

minmax/maxmin findMin

A

O(1)

41
Q

minmax/maxmin findMax

A

O(1)

42
Q

implementation of leftist heap

A

children pointers

43
Q

leftist heap concate

A

O(lgn)

44
Q

leftist heap insert

A

O(lgn)

45
Q

leftist heap deleteMin (for min leftist)

A

O(lgn)

46
Q

leftist heap deleteMax (for max leftist)

A

O(lgn)

47
Q

leftist heap findMin (for min leftist)

A

O(1)

48
Q

leftist heap findMax( for max leftist)

A

O(1)

49
Q

leftist heap buildHeap using insert

A

O(nlgn)

50
Q

implementation of skew heap

A

children pointers

51
Q

skew heap concate

A

O(n)

52
Q

skew heap insert

A

O(n)

53
Q

skew heap deleteMin (for min skew heap)

A

O(n)

54
Q

skew heap deleteMax (for max skew heap)

A

O(n)

55
Q

skew heap findMin (for min skew heap)

A

O(1)

56
Q

skew heap findMax( for max skew heap)

A

O(1)

57
Q

skew heap buildHeap using insert

A

O(n^2)

58
Q

implementation of pairing heap

A

left-child right-sibling pointers

59
Q

pairing heap merge

A

O(1)

60
Q

pairing heap insert

A

O(1)

61
Q

pairing heap findMin (for min pairing heap)

A

O(1)

62
Q

pairing heap findMax (for max pairing heap)

A

O(1)

63
Q

pairing heap deleteMin (for min pairing heap)

A

O(n)

64
Q

pairing heap deleteMax (for max pairing heap)

A

O(n)

65
Q

pairing heap buildHeap using insert

A

O(n)

66
Q

What structure(s) are search trees?

A

binary search trees

2-3 trees

67
Q

What structure(s) are priority queues?

A

k-heaps

68
Q

What structure(s) are double-ended priority queues?

A

dual-heaps

minmax/maxmin heaps

69
Q

What structure(s) are concatenated queues?

A

leftist heaps
skew heaps
pairing heaps

70
Q

Binomial Queue concate

A

O(lgn)

71
Q

Binomial Queue insert

A

O(lgn)

72
Q

Binomial Queue deleteMin

A

O(lgn)

73
Q

Binomial Queue findMin

A

O(lgn)

74
Q

Binomial Queue Build

A

O(nlgn)

75
Q

Fibonacci Heap concate

A

O(1)

76
Q

Fibonacci Heap insert

A

O(1)

77
Q

Fibonacci Heap deleteMin

A

O(n)

78
Q

Fibonacci Heap findMin

A

O(1)

79
Q

Fibonacci Heap decreaseKey

A

O(lgn)

80
Q

Fibonacci Heap delete

A

O(n)

81
Q

AVL tree find

A

0(lgn)

82
Q

AVL tree findMin

A

O(lgn)

83
Q

AVL tree findMax

A

O(lgn)

84
Q

AVL tree delete

A

O(lgn)

85
Q

AVL tree deleteMin

A

O(lgn)

86
Q

AVL tree deleteMax

A

O(lgn)

87
Q

AVL tree insert

A

O(lgn)