Big O Flashcards

1
Q

Find on a BST (average & worst case)

A
Avg      O(logn)
Worst  O(n)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Find on an AVL BST (average & worst case)

A
A O(logn)
W O(logn)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Find on a hash table (average & worst case)

A
A O(1)
W O(n)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Insert on a heap (average & worst case)

A
A O(1)
W O(logn)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Remove on a heap (average & worst case)

A
A O(logn)
W O(logn)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Heapify on an array (average & worst case)

A
A O(n)
W O(n)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Get on an array (worst case)

A

O(1)

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

Get on a Linked List (worst case)

A

O(n)

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

Push on a stack (worst case)

A

O(1)

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

Pop on a stack (worst case)

A

O(1)

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

Add on a Queue (worst case)

A

O(1)

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

Remove on a queue (worst case)

A

O(1)

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