Rookie question about data types (hashtables)
Rainer Deyke
rainerd at eldwood.com
Thu Jan 29 17:17:39 EST 2004
Steve D. Perkins wrote:
>> Sounds like a sorted list would work best. A binary search (see the
>> bisect module) lets find all matches in O(log n) time.
>
>
> Hmm... a double-linked-list with recursion, like back in Freshman
> Programming 101?
I was thinking about a standard Python list, which is actually implemented
as an array, not a linked list. Binary searches don't work on linked lists.
--
Rainer Deyke - rainerd at eldwood.com - http://eldwood.com
More information about the Python-list
mailing list