> For the complete documentation index, see [llms.txt](https://kgisl.gitbook.io/lab3003/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kgisl.gitbook.io/lab3003/docs/bettermap.md).

# BetterMap

A faster implementation of a map using a list of LinearMaps and the built-in function hash() to determine which LinearMap to put each key into.

## Methods

### **init**

Appends (n) LinearMaps onto (self).

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| n    |             | 100     |

### find\_map

Finds the right LinearMap for key (k).

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| k    |             |         |

### add

Adds a new item to the appropriate LinearMap for key (k).

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| k    |             |         |
| v    |             |         |

### get

Finds the right LinearMap for key (k) and looks up (k) in it.

#### Parameters

| name | description | default |
| ---- | ----------- | ------- |
| self |             |         |
| k    |             |         |
