4 ms·
I think a big reason to cache the array length within interviews (for cases when it isn't already cached) is that to not do so can often increase the complexity
by jaredsohn 11y ago
I think a big reason to cache the array length within interviews (for cases when it isn't already cached) is that to not do so can often increase the complexity of a solution by a factor of O(n).