Re: [SLUG] Data structures

From: Russell Hires (rhires@earthlink.net)
Date: Mon Nov 11 2002 - 23:43:10 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is my problem that I come across for most sites:

STACK
"Definition: A collection of items in which only the most recently added item
may be removed. The latest added item is at the top. Basic operations are
push and pop. Also known as "last-in, first-out" or LIFO. "

And my response: "Okay, great! What do you use it for?" or "So what?" This
simply says what a stack is, but nothing more. What would you push or pop?
And why would you? The only "data structure" that I get is the queue, and
only in one context: mouse clicks. You point and click on several items in a
sequence, and the queue processes them in the order that you clicked them.

Russell

On Monday 11 November 2002 23:12 pm, you wrote:
> Russell,
>
> I like exploring and building various data structures as well; sometimes
> just for the fun of it. :) It's really satisfying to find the most
> efficient structure for your data. "Data structure" is a generic term. And
> can be elaborated in many aspects. most prominent languages allow for
> generic structuring. to your direct question: -a stack would come in handy
> for items which need to be queued. A linked-list would be useful when
> storing a data list of an unknown length.
>
> I know that was a simplistic explanation, but I hope it helps.
>
> Here's a few links on the subject:
> http://www.nist.gov/dads/
>
> http://cslibrary.stanford.edu/103/
>
> http://www.inversereality.org/tutorials/c++/linkedlists.html
>
> http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/ds_ToC.html
>
> -Eric
>
> On Monday 11 November 2002 9:29 pm, you wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hey Everyone,
> >
> > I've been doing some exploring on the net about data structures. EVERY
> > tutorial/explanation/what-have-you tells you what they are, how they
> > work, etc., but they do not under any circumstances tell you what you
> > would use them for...why would I use a stack, or a linked list, or
> > whatever? They also don't say how to use them in {programming language}.
> > This has been quite frustrating. Can anyone give me a hint, or point me
> > to some documentation that talks about why you'd want to use a given data
> > structure?
> >
> > Russell
> > - --
> > Linux -- the OS for the Renaissance Man
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.6 (GNU/Linux)
> > Comment: For info see http://www.gnupg.org
> >
> > iD8DBQE90GehAqKGrvVshJQRAnUmAKDP2TuEE4j8g2iwp/7l9XjehKDsUwCg6EmV
> > ef1bpM2xNjMkmgzCONdi3fE=
> > =Hott
> > -----END PGP SIGNATURE-----

- --
Linux -- the OS for the Renaissance Man
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE90IbeAqKGrvVshJQRAgBcAJdDujV9CSjHFMT8z0uWonoYbsUsAJ4m2TKP
cRbyvLY7ud4LST7IGXzSqA==
=WzFH
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:34:04 EDT