Efficiency/Number of Steps per Function Flashcards

1
Q

Linear Search

A

O(n)

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

merge sort

A

O(nlogn)

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

binary search

A

O(logn)

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

no iteration

A

O(1)

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

if 2 functions

A

the bigger one determines efficiency

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

monkey puzzle

A

O(n!)

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

Traveling salesperson

A

O(n!)

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

Map coloring

A

O(3**n)

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

Satisfiability

A

O(2**n)

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

Towers of Hanoii

A

steps = (2**number of disks)-1

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

Insertion Sort

A

O(n**2)

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

Binary Search Tree formula for number of nodes given k levels

A

n = 2**k - 1

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