A collection of data structures written in Lua.
List
(virtual) - sequential value containerArrayList
- list backed by an arrayLinkedList
- list backed by a double-linked listDeque
- list backed by a moving-start array/hashmap
Map
(virtual) - key-value mapped containerOrderedMap
- map backed by a red-black tree, iterator sorts keys in orderListMap
- map backed by three tables (one for key->order, one for order->value, one for order->key), iterator sorts by when items were addedUnorderedMap
- map backed by a hashmap table, iterator is unsortedTrieMap
- map backed by a trie, iterator sorts keys alphabetically
Set
(virtual) - non-repeating value container with set operationsOrderedSet
- set backed by a red-black tree, iterator sorts values in orderListSet
- set backed by two tables (one for key->order, one for order->key), iterator sorts by when values were addedUnorderedSet
- set backed by a table, iterator is unsortedTrieSet
- set backed by a trie, iterator sorts values alphabetically
BST
- binary search treeAVLTree
- self-balancing AVL BSTRedBlackTree
- self-balancing red-black tree
Heap
- min-/max-heap sorted removal containerQueue
- first-in, first-out queue backed by anyList
typePriorityQueue
- first-in, usually-first-out queue with priority levels, backed by a max-heap
Stack
- first-in, last-out stack backed by anyList
typeTrie
- prefix tree for strings, for text prediction
MIT