mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
16 lines
461 B
Markdown
16 lines
461 B
Markdown
---
|
|
title: "hah-map"
|
|
aliases: map, hash map, hash set
|
|
tags:
|
|
- cosmc201
|
|
- datastructure
|
|
---
|
|
|
|
In compsci a map is a comprised of a set of keys and values. (`<K, V>`). For example `<String, Integer>`
|
|
|
|
So sets are a prerequisite for maps
|
|
|
|
The fundamental map operations are:
|
|
- `Put(k, v)` --> Add the this key-value pair to the map. If the present: update the key
|
|
- `Get(k)` --> returns the value associated with `` is present
|
|
- `Remove(k)` --> Removes the key `k` |