AQA A-Level Computer Science · Section 4.2 Fundamentals of Data Structures
| Key | key MOD 7 | Index |
|---|---|---|
| 15 | 15 MOD 7 = 1 | 1 |
| 24 | 24 MOD 7 = 3 | 3 |
| 36 | 36 MOD 7 = 1 | COLLISION! |
| 8 | 8 MOD 7 = 1 | COLLISION! |
| 22 | 22 MOD 7 = 1 | COLLISION! |
| Index | Contents after inserts |
|---|---|
| 0 | — |
| 1 | 15 (hashed here) |
| 2 | 36 (probed to 2) |
| 3 | 24 (hashed here) |
| 4 | 8 (probed to 4) |
| 5 | 22 (probed to 5) |
| 6 | — |
| Operation | Average Case | Worst Case |
|---|---|---|
| Insert | O(1) | O(n) |
| Search | O(1) | O(n) |
| Delete | O(1) | O(n) |