Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
C++ Programming

 

Data Structures

A hash table (also known as associative array, lookup table, dictionary, hash) is a way of storing values against keys. Often the keys are strings, in this example the values are numbers.
Typical operations required:
add or put or set
insert a new (key,value) pairs
lookup or get
retrieve the value for a given key
iterate
run over every key
hash
keyvalue
andrew2753
sally2742
gordon2754
This structure is so useful that we find it in most programming languages. Often there are many different options that have subtly different characteristics. Usually we want fast retrieval and we may or may not care about: fast insert, efficient use of memory, the order of the keys.

1. [ C++ ] Telephone book


Big

2. [ C++ ] Missing items


Big

3. [ C++ ] Getting all values back


Big

4. [ C++ ] Getting keys back in the right order


Big

If you want the keys in order it is best to use a structure that maintains order in the first place.