Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] looping recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-07-30 (12:44)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] looping recursion
Jon Harrop wrote:
> On Thursday 29 July 2004 23:42, you wrote:
>>...I won't by
>>imperative programming for anything at all...
> What would you do if you wanted a data structure with O(1) lookup?

Such structures do not exists. Remember that complexity theory deals 
with *unbounded* input sizes. As you can well imagine, there exists no 
such thing as an indefinitely large datastructure with O(1) time 
complexity. Arrays are O(1) only if you preallocate them to the maximum 
size allowed by the application. But, in this case, even a binary search 
in Map.t is O(1): that is, bounded by a constant.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: