<p>I'm quite confused about the basic concepts of a Hash table. If I were to code a hash how would I even begin? What is the difference between a Hash table and just a normal array? </p>

<p>Basically if someone answered this question I think all my questions would be answered:
If I had 100 randomly generated numbers (as keys), how would I implement a hash table and why would that be advantageous over an array?</p>

<p>Psuedo-code or Java would be appreciated as a learning tool...</p>

Hashtables are
associative
.  This is a huge difference from arrays, which are just linear data structures.  With an array, you might do something like this:
```
```
int[] arr = ...
for (int i = 0; i < arr.length; i++) {
    System.out.println(arr[i] + 1);
}
```
```
Notice how you are getting an element out of the array by specifying an exact memory offset (
```
i
```
).  This contrasts with hashtables, which allow you to store key/value pairs, later retrieving the value based on the key:
```
```
Hashtable<String, Integer> table = new Hashtable<String, Integer>();
table.put("Daniel", 20);
table.put("Chris", 18);
table.put("Joseph", 16);
```
```
With the above table, we can make the following call:
```
```
int n = table.get("Chris");
```
```
...and be assured that
```
n
```
will be valued at
```
18
```
.
I think this will probably answer most of your questions.  The implementation of a hashtable is a fairly interesting topic, one
which Wikipedia addresses passably well
.