Skip to content

Latest commit

Β 

History

History
67 lines (47 loc) Β· 2.55 KB

README.md

File metadata and controls

67 lines (47 loc) Β· 2.55 KB

Table of content

HashMaps


Map

  • Map is a Data Structre which stores Key-value pair.
  • Map is a container
  • No two mapped values can have the same key values.
  • Ordered Maps use Red Black Trees.
  • Maps are not contious Example it++ is allowed while it+1 is not.
  • All keys are unique if redeclaration happens the pair with that pre-existing key updates.

Implementation

Red-Black-Tree-Implementation

Functions

  • Maps contains many function but mainly begin(),end(),size(),empty(),find(),erase(),clear()
  • begin() : Returns an iterator to the first element in the map.
  • end() : Returns an iterator to the theoretical element that follows the last element in the map.
  • size() : Returns the number of elements in the map.

Map-size()

  • empty() : Returns whether the map is empty.
  • erase(const g) : Removes the key-value β€˜g’ from the map.
  • clear() : Removes all the elements from the map.
  • find() : Returns an iterator to the element with key-value β€˜g’ in the map if found, else returns the iterator to end.

Map-find()

Multimap


UnorderedMap


UnorderedMaps-CustomHashmaps-OperatorOverloading