[Tutor] terminology

david din22 at earthlink.net
Tue Dec 6 13:50:58 CET 2005


thanks for tries and bisect. this led me to the wikipedia article
http://en.wikipedia.org/wiki/Search_algorithm
which was where i was looking to start. so, i think the simplest
approach to search through a short list would be a brute force
algorithm. like so :

get a letter and compare it to every item in the list
if there is only one match:
   we're done
if there is more than one:
  get another letter 
rinse and repeat

this is usually how i figure out how to code stuff. anyway,
i am thinking there could be other brute-force algorithms
that would accomplish the same thing.
please correct me if i use any terminology incorrectly.

so a trie would be a data structure for holding your list in.
and bisect would be an algorithm for searching through a list.
and determining which data structures and which algorithms
to use would be depending on the nature of the list and
what you wanted to do with it. have i got this right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20051206/2ed8f297/attachment.htm


More information about the Tutor mailing list