Transforming Lives. Inventing the Future.

 

Data Structures

Data structures are logical containers that are used to store information in many levels of the software that runs a computer. They are not physical containers, but abstract ideas that dictate the way a piece of informatin is stored. Some common data structures are array (or vector), list, tree, stack, queue, hash table, and graph. The developer can choose between any of these structures to store the data in the software they are developing, depending on how the application will be accessig the data.

Each structure will store and retieve information differently so one must be careful when choosing which one to use. For example, an array will store data 'sequentially'. Searching for a particular item stored in the array will require traversing the whole array one by one using an integer index. An index is a marker that tells what position you are at in the array. However, you can use this index to quickly access the 5th element, or nth element in the array. Thus, if you have a to store and retrieve a lot of information based on a key value (instead of a numeric index), using an array is not a such a good idea. On the other hand, a hash table stores information by using a key. Imagine going visiting an old friend whom address you have forgotten. However, you know the vacinity where he lives and will probably find the house by driving slowly and looking at one house one by one. Wouldn't it be better if you call the friend and ask for the exact address? A hash value in a hash table is similar to an address, you know exactly where to get the information you want. Thus, a hash table will allow you to retrieve things very quickly. So, data structures are available for many different needs, but developers have to make sure their choice is correct, or their software will suffer in terms of time and efficency.

Data Structures Guide - An introductory guide to data structures.

Demonstration - Visual demonstrations of data structures.

© 2005 Illinois Institute of Technology