[Tutor] When am I ever going to use this?
jordangreenberg at gmail.com
Wed Aug 2 01:13:15 CEST 2006
Christopher Spears wrote:
> I've been working through a tutorial:
> Lately, I have been learning about abstract data types
> (linked lists, stacks, queues, trees, etc.). While I
> do enjoy the challenge of creating these objects, I am
> not sure what they are used for.
> Tutor maillist - Tutor at python.org
They all have many uses. Priority Queues are used frequently in
operating systems for process scheduling, etc. Trees are fantastic for
most any searching application. Linked lists can be used for general
purpose storage (since unlike arrays, their size is not fixed.)
Learning data structures is really the one thing i wouldn't recommend
python for, just because the job is usually done for you. Why implement
a linked list, when we already have lists? Then Queues and Stacks are
trivial to implement once you've got lists.
If you're interested in learning more about data structures and their
uses, this looks like a good reference:
More information about the Tutor