diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5935ab9..711153b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
-## [v1.46.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
+## [v1.46.6](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
### Changes
diff --git a/README.md b/README.md
index 21d912b..8f185a5 100644
--- a/README.md
+++ b/README.md
@@ -759,53 +759,53 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.key) // ['A', 'B', '
[//]: # (No deletion!!! Start of Replace Section)
-
comparison
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
SRC 10,000 add | 0.57 | 1745.63 | 5.99e-6 |
CJS 10,000 add | 0.57 | 1746.43 | 5.30e-6 |
MJS 10,000 add | 0.58 | 1724.97 | 5.73e-5 |
CPT PQ 10,000 add | 0.57 | 1745.61 | 7.49e-6 |
SRC PQ 10,000 add & pop | 3.42 | 292.15 | 3.23e-5 |
CJS PQ 10,000 add & pop | 3.37 | 296.36 | 3.64e-5 |
MJS PQ 10,000 add & pop | 3.37 | 296.66 | 3.48e-5 |
CPT PQ 10,000 add & pop | 2.07 | 482.94 | 2.10e-5 |
CPT OM 100,000 add | 44.47 | 22.49 | 0.00 |
CPT HM 10,000 set | 0.58 | 1716.99 | 1.45e-5 |
CPT HM 10,000 set & get | 0.67 | 1491.78 | 1.61e-5 |
CPT LL 1,000,000 unshift | 67.95 | 14.72 | 0.02 |
CPT PQ 10,000 add & pop | 2.09 | 478.64 | 9.70e-5 |
CPT DQ 1,000,000 push | 14.50 | 68.96 | 2.78e-4 |
CPT Q 1,000,000 push | 47.51 | 21.05 | 0.00 |
CPT ST 1,000,000 push | 42.03 | 23.79 | 0.01 |
CPT ST 1,000,000 push & pop | 48.84 | 20.48 | 0.00 |
-
avl-tree
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 30.95 | 32.32 | 4.46e-4 |
10,000 add & delete randomly | 70.84 | 14.12 | 0.00 |
10,000 addMany | 40.64 | 24.61 | 3.31e-4 |
10,000 get | 27.92 | 35.81 | 2.07e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 31.32 | 31.93 | 3.67e-4 |
10,000 add & delete randomly | 70.90 | 14.10 | 0.00 |
10,000 addMany | 40.58 | 24.64 | 4.87e-4 |
10,000 get | 27.31 | 36.62 | 2.00e-4 |
binary-tree
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 add randomly | 12.85 | 77.80 | 3.77e-4 |
1,000 add & delete randomly | 15.73 | 63.57 | 1.51e-4 |
1,000 addMany | 10.15 | 98.50 | 9.02e-5 |
1,000 get | 18.20 | 54.95 | 3.43e-4 |
1,000 dfs | 152.06 | 6.58 | 7.60e-4 |
1,000 bfs | 55.85 | 17.91 | 3.14e-4 |
1,000 morris | 256.13 | 3.90 | 9.73e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 add randomly | 12.35 | 80.99 | 7.17e-5 |
1,000 add & delete randomly | 15.98 | 62.58 | 7.98e-4 |
1,000 addMany | 10.96 | 91.27 | 0.00 |
1,000 get | 18.61 | 53.73 | 0.00 |
1,000 dfs | 164.20 | 6.09 | 0.04 |
1,000 bfs | 58.84 | 17.00 | 0.01 |
1,000 morris | 256.66 | 3.90 | 7.70e-4 |
bst
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 27.96 | 35.76 | 2.98e-4 |
10,000 add & delete randomly | 66.96 | 14.93 | 7.52e-4 |
10,000 addMany | 29.42 | 33.99 | 3.30e-4 |
10,000 get | 28.55 | 35.03 | 1.99e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 31.59 | 31.66 | 2.74e-4 |
10,000 add & delete randomly | 74.56 | 13.41 | 8.32e-4 |
10,000 addMany | 29.16 | 34.30 | 0.00 |
10,000 get | 29.24 | 34.21 | 0.00 |
rb-tree
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 add | 87.42 | 11.44 | 0.00 |
100,000 CPT add | 44.17 | 22.64 | 0.00 |
100,000 add & delete randomly | 220.91 | 4.53 | 0.02 |
100,000 getNode | 40.48 | 24.70 | 5.58e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 add | 85.85 | 11.65 | 0.00 |
100,000 add & delete randomly | 211.54 | 4.73 | 0.00 |
100,000 getNode | 37.92 | 26.37 | 1.65e-4 |
+
+
comparison
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
SRC PQ 10,000 add | 0.57 | 1748.73 | 4.96e-6 |
CJS PQ 10,000 add | 0.57 | 1746.69 | 4.91e-6 |
MJS PQ 10,000 add | 0.57 | 1749.68 | 4.43e-6 |
SRC PQ 10,000 add & pop | 3.47 | 288.14 | 6.38e-4 |
CJS PQ 10,000 add & pop | 3.39 | 295.36 | 3.90e-5 |
MJS PQ 10,000 add & pop | 3.37 | 297.17 | 3.03e-5 |
directed-graph
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 addVertex | 0.10 | 9667.55 | 9.48e-7 |
1,000 addEdge | 6.17 | 161.99 | 1.79e-4 |
1,000 getVertex | 0.05 | 2.17e+4 | 3.52e-7 |
1,000 getEdge | 23.52 | 42.51 | 0.00 |
tarjan | 220.31 | 4.54 | 0.01 |
tarjan all | 224.17 | 4.46 | 0.00 |
topologicalSort | 192.50 | 5.19 | 0.03 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 addVertex | 0.10 | 9534.93 | 8.72e-7 |
1,000 addEdge | 6.30 | 158.67 | 0.00 |
1,000 getVertex | 0.05 | 2.16e+4 | 3.03e-7 |
1,000 getEdge | 22.31 | 44.82 | 0.00 |
tarjan | 210.90 | 4.74 | 0.01 |
tarjan all | 214.72 | 4.66 | 0.01 |
topologicalSort | 172.52 | 5.80 | 0.00 |
hash-map
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 set | 269.88 | 3.71 | 0.04 |
1,000,000 CPT set | 251.08 | 3.98 | 0.05 |
1,000,000 Map set | 214.03 | 4.67 | 0.02 |
1,000,000 Set add | 170.84 | 5.85 | 0.01 |
1,000,000 set & get | 404.20 | 2.47 | 0.06 |
1,000,000 CPT set & get | 279.39 | 3.58 | 0.07 |
1,000,000 Map set & get | 269.85 | 3.71 | 0.01 |
1,000,000 Set add & has | 202.46 | 4.94 | 0.12 |
1,000,000 ObjKey set & get | 891.01 | 1.12 | 0.03 |
1,000,000 Map ObjKey set & get | 316.41 | 3.16 | 0.05 |
1,000,000 Set ObjKey add & has | 277.27 | 3.61 | 0.03 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 set | 275.88 | 3.62 | 0.12 |
1,000,000 Map set | 211.66 | 4.72 | 0.01 |
1,000,000 Set add | 177.72 | 5.63 | 0.02 |
1,000,000 set & get | 317.60 | 3.15 | 0.02 |
1,000,000 Map set & get | 274.99 | 3.64 | 0.03 |
1,000,000 Set add & has | 172.23 | 5.81 | 0.02 |
1,000,000 ObjKey set & get | 929.40 | 1.08 | 0.07 |
1,000,000 Map ObjKey set & get | 310.02 | 3.23 | 0.05 |
1,000,000 Set ObjKey add & has | 283.28 | 3.53 | 0.04 |
heap
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add & pop | 5.89 | 169.67 | 2.36e-4 |
10,000 fib add & pop | 362.10 | 2.76 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add & pop | 5.80 | 172.35 | 8.78e-5 |
10,000 fib add & pop | 357.92 | 2.79 | 0.00 |
doubly-linked-list
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 234.96 | 4.26 | 0.07 |
1,000,000 CPT push | 83.46 | 11.98 | 0.04 |
1,000,000 unshift | 220.58 | 4.53 | 0.03 |
1,000,000 CPT unshift | 73.26 | 13.65 | 0.03 |
1,000,000 unshift & shift | 168.56 | 5.93 | 0.01 |
1,000,000 insertBefore | 330.81 | 3.02 | 0.04 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 221.57 | 4.51 | 0.03 |
1,000,000 unshift | 229.02 | 4.37 | 0.07 |
1,000,000 unshift & shift | 169.21 | 5.91 | 0.02 |
1,000,000 insertBefore | 314.48 | 3.18 | 0.07 |
singly-linked-list
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 push & pop | 216.94 | 4.61 | 0.02 |
10,000 insertBefore | 248.68 | 4.02 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 push & pop | 212.98 | 4.70 | 0.01 |
10,000 insertBefore | 250.68 | 3.99 | 0.01 |
max-priority-queue
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 refill & poll | 8.78 | 113.94 | 1.48e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 refill & poll | 8.91 | 112.29 | 2.26e-4 |
priority-queue
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 add & pop | 103.20 | 9.69 | 0.00 |
100,000 CPT add & pop | 27.41 | 36.49 | 7.73e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 add & pop | 103.59 | 9.65 | 0.00 |
deque
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 13.99 | 71.46 | 2.13e-4 |
1,000,000 CPT push | 13.36 | 74.88 | 1.70e-4 |
1,000,000 push & pop | 23.47 | 42.61 | 0.01 |
1,000,000 push & shift | 24.19 | 41.34 | 0.00 |
1,000,000 unshift & shift | 22.13 | 45.19 | 5.99e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 14.55 | 68.72 | 6.91e-4 |
1,000,000 push & pop | 23.40 | 42.73 | 5.94e-4 |
1,000,000 push & shift | 24.41 | 40.97 | 1.45e-4 |
1,000,000 unshift & shift | 22.56 | 44.32 | 1.30e-4 |
queue
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 37.01 | 27.02 | 9.55e-4 |
1,000,000 CPT push | 43.81 | 22.82 | 0.01 |
1,000,000 push & shift | 81.31 | 12.30 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 39.90 | 25.07 | 0.01 |
1,000,000 push & shift | 81.79 | 12.23 | 0.00 |
stack
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 37.88 | 26.40 | 0.00 |
1,000,000 CPT push | 39.17 | 25.53 | 0.00 |
1,000,000 push & pop | 46.24 | 21.63 | 0.00 |
1,000,000 CPT push & pop | 47.16 | 21.21 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 37.60 | 26.60 | 0.00 |
1,000,000 push & pop | 47.01 | 21.27 | 0.00 |
trie
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 push | 42.84 | 23.35 | 8.44e-4 |
100,000 getWords | 92.26 | 10.84 | 0.01 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 push | 45.97 | 21.76 | 0.00 |
100,000 getWords | 66.20 | 15.11 | 0.00 |
[//]: # (No deletion!!! End of Replace Section)
diff --git a/package.json b/package.json
index 32f2503..b2d9137 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "data-structure-typed",
- "version": "1.46.5",
- "description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
+ "version": "1.46.6",
+ "description": "Data Structures of Javascript & TypeScript. Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack.",
"main": "dist/cjs/index.js",
"module": "dist/mjs/index.js",
"types": "dist/mjs/index.d.ts",
@@ -101,8 +101,6 @@
"data-structures",
"in data structures",
"in data structure",
- "DataStructure",
- "DataStructures",
"binary",
"depth",
"breadth",
@@ -110,10 +108,18 @@
"search",
"index",
"avl",
+ "red",
+ "black",
+ "redblack",
+ "RB",
"segment",
"prefix",
"tree",
+ "multi",
+ "map",
+ "set",
"multiset",
+ "multimap",
"directed",
"undirected",
"graph",
@@ -131,39 +137,53 @@
"javascript",
"typscript",
"Node.js",
- "CommonJS",
- "ES6",
- "UMD",
- "esmodule",
- "java.util",
- "c++ stl",
- "c++ std",
- "Python collections",
- "System.Collections.Generic",
- "STL",
- "stl",
- "STD",
+ "NodeJS",
+ "c++",
"std",
- "util",
- "Collections",
+ "C++ STL",
+ "c++stl",
+ "C++ std",
+ "stl",
+ "std::",
+ "Python",
"collections",
+ "Python Collections",
+ "pythoncollections",
+ "python-collections",
+ "C#",
+ "System.Collections.Generic",
"collection",
+ "java.util",
+ "Java",
"util",
- "sort",
- "algorithm",
"binary search tree",
"binarysearchtree",
"binary-search-tree",
+ "BST",
"binary tree",
"binarytree",
"binary-tree",
- "bst",
- "BST",
+ "red black tree",
+ "redblacktree",
+ "redblack tree",
+ "red-black-tree",
+ "redblack-tree",
+ "trie",
+ "prefix tree",
+ "prefixtree",
+ "prefix-tree",
"avl tree",
"avltree",
"avl-tree",
+ "tree set",
+ "treeset",
+ "tree-set",
"tree multiset",
"treemultiset",
+ "tree-multiset",
+ "tree map",
+ "treemap",
+ "tree-map",
"tree multimap",
"treemultimap",
"tree-multimap",
@@ -173,21 +193,31 @@
"segment tree",
"segmenttree",
"segment-tree",
- "trie",
- "prefix tree",
- "prefixtree",
- "prefix-tree",
+ "sort",
+ "sorted",
+ "order",
+ "ordered",
+ "algorithm",
+ "morris",
+ "Morris",
+ "bellman ford",
+ "bellmanford",
+ "bellman-ford",
+ "dijkstra",
+ "Dijkstra",
+ "floyd warshall",
+ "floydwarshall",
+ "floyd-warshall",
+ "tarjan",
+ "tarjan's",
"dfs",
- "DFS",
"depth first Search",
"depthfirstSearch",
"depth-first-Search",
"bfs",
- "BFS",
"breadth first search",
"breadthfirstsearch",
"dfs iterative",
- "DFS Iterative",
"recursive",
"iterative",
"directed graph",
@@ -211,13 +241,12 @@
"min priority queue",
"minpriorityqueue",
"min-priority-queue",
- "array queue",
- "array-queue",
- "stack",
"hash",
+ "map",
+ "hash map",
+ "hashmap",
+ "hash-map",
"deque",
- "object deque",
- "array deque",
"linked list",
"linkedlist",
"linked-list",
@@ -227,18 +256,12 @@
"doubly linked list",
"doublylinkedlist",
"doubly-linked-list",
- "morris",
- "Morris",
- "bellman ford",
- "Bellman Ford",
- "bellman-ford",
- "dijkstra",
- "Dijkstra",
- "floyd warshall",
- "Floyd Warshall",
- "floyd-warshall",
- "tarjan",
- "Tarjan",
- "Tarjan's"
+ "stack",
+ "CommonJS",
+ "ES6",
+ "UMD",
+ "ES Modules",
+ "ESModules",
+ "ESModule"
]
}