Big O Space Flashcards
1
Q
Most primitives (booleans, numbers, undefined, null) are ____ space
A
constant O(1)
2
Q
Strings
A
O(n) space where n is the string length
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