3 ms·
In the same way, any naively "constant space" algorithm that indexes into an array with a fixed number of pointers or indices is technically O(log n) in space,
by senderista 17y ago
In the same way, any naively "constant space" algorithm that indexes into an array with a fixed number of pointers or indices is technically O(log n) in space, since you need log n bits to index n objects. So a space factor of log n can generally be treated as constant in practice.