Collections Overview

CollectionAbstract Data TypeData StructureDetails
BidiMap
bidimap.h
Bidirectional MapTwo HashtablesA bijection between two sets of unique keys and unique values K <-> V using two hashtables
Deque
deque.h
Double-Ended QueueDynamic Circular ArrayA circular array that allows push and pop on both ends (only) at constant time
HashMap
hashmap.h
MapHashtableA unique set of keys associated with a value K -> V with constant time look up using a hashtable with open addressing and robin hood hashing
HashSet
hashset.h
SetHashtableA unique set of values with constant time look up using a hashtable with open addressing and robin hood hashing
Heap
heap.h
Priority QueueDynamic ArrayA binary heap as a dynamic array as an implicit data structure
IntervalHeap
intervalheap.h
Double-Ended Priority QueueCustom Dynamic ArrayA dynamic array of nodes, each hosting one value from the MinHeap and one from the MaxHeap
LinkedList
linkedlist.h
ListDoubly-Linked ListA default doubly-linked list
List
list.h
ListDynamic ArrayA dynamic array with push and pop anywhere on the array
MultiMap
multimap.h
MultimapCustom HashtableA mapping of multiple keys with one node per key using a hashtable with separate chaining
Multiset
multiset.h
MultisetHashtableA mapping of a value and its multiplicity using a hashtable with open addressing and robin hood hashing
Queue
queue.h
FIFODynamic Circular ArrayA queue using a circular array with enqueue at the back index and dequeue at the front index
SortedList
sortedlist.h
Sorted ListSorted Dynamic ArrayA lazily sorted dynamic array that is sorted only when necessary
Stack
stack.h
FILODynamic ArrayA stack with push and pop at the end of a dynamic array
TreeMap
treemap.h
Sorted MapAVL TreeA unique set of keys associated with a value K -> V using an AVL tree with log(n) look up and sorted iteration
TreeSet
treeset.h
Sorted SetAVL TreeA unique set of keys using an AVL tree with log(n) look up and sorted iteration