Runtimes: Algorithms and Data Structures Flashcards

1
Q

Merge Sort

A

O(n Log n ): average and worst case

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

Quick Sort

A

O(n log n ): average

O(n^2): worst case

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

Insertion Sort

A

O(N): best

O(N^2): worst

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

Bubble Sort

A

O(N): best

O(N^2): worst

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

Binary Search

A

O(Log n ): average and wort case

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

Recursion requires memory, which is equal to…

A

Runtime

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

Array

A

O(N)

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

Dictionary / Hashtable

A

O(1) lookup

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

Linked List finding first and any other node…

A

O(1) and O(N), respectively

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