[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A very basic thing I don't get
- From: "Pascal J. Bourguignon" <pjb@...>
- Date: Sun, 02 Oct 2011 23:33:50 +0200
Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
>> [...] but thinking of them as _either_ a linear O(1) structure
>> _or_ a O(N log N) map is a mistake. [...]
>
> Just a detail: both arrays and maps are O(1) in space, and both are
So when I add one million entries to an array it still takes the same
space as when I have only one entry. Interesting. Perhaps I'll have an
entry for each star in the universe...
> O(1) in time for the average case.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.