# Hashes Review

## Review Questions

1.  What is a hash function?  How is it important to how a Hash Table works?
2.  What is a bucket?
3.  When it comes to Hash Tables, what is a collision?
4.  Why are hash tables so darned useful?

## Quick Exercise

You don't need to code this solution, but how could you use a **hash** to solve it on O(n) time complexity?

### Single Number

Given a non-empty array of integers, every element appears twice except for one. Find that single one.

```
Example 1:

Input: [2,2,1]
Output: 1
```

```
Example 2:

Input: [4,1,2,1,2]
Output: 4
```