Big O Space Flashcards

1
Q

Most primitives (booleans, numbers, undefined, null) are ____ space

A

constant O(1)

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

Strings

A

O(n) space where n is the string length

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

Reference types (arrays, objects)

A

O(n), where n is the length of the array or the number of keys in the object

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