Big O notation Flashcards

1
Q

time complexity

A

shows how much time it requires to solve a particular problem

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

what is time complexity measured using

A

Big O notation which shows the effectiveness of an algorithm

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

O(1)

A

**Constant time complexity **

the time taken to complete an algorithm is independant from the number of elements inputed

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

O(n)

A

linear time complexity- the time taken to complete an algorithm is directly proportional to the number of elements inputted

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

O(n^2)

A

polynomial time complexity- the time taken to complete an algorithm is directly proportionate to the square of elements inputted

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

O(2n)

A

**exponential time complexity ** - the amount of time taken to cmoplete an algorithm will double each time an item is added

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

O(log n)

A

**logarithmic time complexity ** - the time taken to complete an algorithm will increase at a smalelr rate as the number of elements is inputted

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

binary search time complexity is…

A

(o(log(n))

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

linear search time complexity is…

A

o(n)

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

bubble sort time complexity is

A

0(n^2)

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