Section 8 Chapter 45 - Big-O Notation Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a function in terms of mappings

A

It is a mapping from one set of values to another set of values (the domain to the co-domain)

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

Time complexity

A

The time that an algorithm takes to complete

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

Permutations

A

All the different ways of arranging a set of objects

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

Number of permutations

A

n!

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

How to express constant time with Big O notation

A

O(1)

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

How to express linear time with Big O notation

A

O(n)

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

How to work out the time complexity of a function

A

Look for the most important term (ignore all coefficients)

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

How to work out the time complexity of an algorithm

A

X nested for loops means complexity n^X
Splitting the search space into pieces is log(n)
Checking permutations is n!

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