JavaScript Data Structures & Algorithms Flashcards

1
Q

What is Big O notation?

A

Big O notation describes the complexity of a code using algebraic terms.

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

How does O(n) work?

A

O(n) O of N, the number of operations is going to be proportional to whatever “n” is.

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

How does O(2n) work? (or Oxn)

A

It runs the same as O of N, the number of operations is going to be proportional to whatever “n” is.

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

How does O(n²) work?

A

O(n²) (“Big O squared”) completes tasks with fewer operations. Much more efficient than O(n).

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

What is “Recursion”?

A

A function that calls itself, until it doesn’t.

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

What is a “Callback”?

A

A function passed into another function as a parameter.

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