Maps
Collections of key-value pairs such that each unique key can have only one occurrence in the collection.
Last updated
Was this helpful?
Collections of key-value pairs such that each unique key can have only one occurrence in the collection.
Last updated
Was this helpful?
Import alias 'ads-js/maps'
This group provides implementations of different data-structures for fast search and access. It does not include common for such libraries / classes because they do already exist in JavaScript since ES6. Instead of replacing standard JS built-ins, classes presented here implement the same interfaces and may be used alongside with the first ones in the same client code.
- a map that provides ordering on its keys. Keys are ordered by a provided at map creation time or by default as strings.
- container which stores only pairs forming strictly increasing trend in both keys and values. This structure is based on SortedMap.
- sorted map based on an AVL binary tree structure.
- sorted map based on a splay binary tree structure.
- sorted map based on a red-black binary tree structure.