diff --git a/README.md b/README.md
index ecb41837..0b3571b9 100644
--- a/README.md
+++ b/README.md
@@ -280,6 +280,13 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
|
+Red Black Tree |
+ |
+ |
+AVLTree |
+ |
+
+
Tree Multiset |
|
|
@@ -288,7 +295,7 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
Segment Tree |
- |
+ |
|
SegmentTree |
|
@@ -366,20 +373,20 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
Stack |
|
- |
+ |
Stack |
|
Coordinate Set |
- |
+ |
|
CoordinateSet |
|
Coordinate Map |
- |
+ |
|
CoordinateMap |
|
@@ -415,7 +422,7 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
Trie |
|
- |
+ |
Trie |
|
@@ -629,40 +636,40 @@ optimal approach to data structure design.
[//]: # (Start of Replace Section)
avl-tree
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 30.18 | 33.13 | 2.75e-4 |
10,000 add & delete randomly | 65.65 | 15.23 | 0.00 |
10,000 addMany | 39.56 | 25.28 | 3.25e-4 |
10,000 get | 26.57 | 37.63 | 1.92e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 30.65 | 32.63 | 3.52e-4 |
10,000 add & delete randomly | 66.84 | 14.96 | 0.00 |
10,000 addMany | 41.52 | 24.08 | 0.01 |
10,000 get | 26.85 | 37.24 | 4.74e-4 |
binary-tree
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 add randomly | 13.00 | 76.93 | 3.84e-4 |
1,000 add & delete randomly | 16.11 | 62.06 | 3.76e-4 |
1,000 addMany | 10.63 | 94.04 | 1.30e-4 |
1,000 get | 18.24 | 54.84 | 5.04e-4 |
1,000 dfs | 69.77 | 14.33 | 4.07e-4 |
1,000 bfs | 54.49 | 18.35 | 4.96e-4 |
1,000 morris | 37.10 | 26.96 | 2.35e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 add randomly | 12.99 | 76.99 | 3.06e-4 |
1,000 add & delete randomly | 16.12 | 62.04 | 4.54e-4 |
1,000 addMany | 10.95 | 91.29 | 8.27e-4 |
1,000 get | 18.10 | 55.24 | 2.56e-4 |
1,000 dfs | 69.33 | 14.42 | 6.64e-4 |
1,000 bfs | 57.04 | 17.53 | 4.09e-4 |
1,000 morris | 37.14 | 26.93 | 3.56e-4 |
bst
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 31.88 | 31.37 | 3.10e-4 |
10,000 add & delete randomly | 73.08 | 13.68 | 0.01 |
10,000 addMany | 28.80 | 34.73 | 0.00 |
10,000 get | 27.59 | 36.25 | 2.19e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add randomly | 29.60 | 33.79 | 3.76e-4 |
10,000 add & delete randomly | 67.45 | 14.83 | 0.00 |
10,000 addMany | 29.09 | 34.38 | 8.10e-4 |
10,000 get | 27.81 | 35.96 | 8.19e-4 |
rb-tree
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 add randomly | 70.97 | 14.09 | 0.00 |
100,000 add & 1000 delete randomly | 82.03 | 12.19 | 0.01 |
100,000 getNode | 59.75 | 16.74 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 add randomly | 73.46 | 13.61 | 0.01 |
100,000 add & 1000 delete randomly | 81.35 | 12.29 | 0.01 |
100,000 getNode | 65.23 | 15.33 | 0.01 |
directed-graph
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 addVertex | 0.10 | 9894.62 | 1.57e-6 |
1,000 addEdge | 6.17 | 162.15 | 0.00 |
1,000 getVertex | 0.05 | 2.17e+4 | 4.06e-7 |
1,000 getEdge | 23.50 | 42.56 | 0.00 |
tarjan | 223.18 | 4.48 | 0.01 |
tarjan all | 226.10 | 4.42 | 0.01 |
topologicalSort | 186.20 | 5.37 | 0.02 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000 addVertex | 0.10 | 9826.70 | 4.27e-6 |
1,000 addEdge | 6.37 | 156.88 | 3.98e-4 |
1,000 getVertex | 0.05 | 2.14e+4 | 9.10e-7 |
1,000 getEdge | 22.93 | 43.62 | 0.00 |
tarjan | 213.01 | 4.69 | 0.01 |
tarjan all | 213.98 | 4.67 | 0.00 |
topologicalSort | 174.06 | 5.74 | 0.01 |
heap
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add & pop | 4.64 | 215.30 | 4.51e-5 |
10,000 fib add & pop | 351.83 | 2.84 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 add & pop | 4.65 | 214.97 | 1.07e-4 |
10,000 fib add & pop | 354.24 | 2.82 | 0.00 |
doubly-linked-list
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 unshift | 216.19 | 4.63 | 0.04 |
1,000,000 unshift & shift | 164.84 | 6.07 | 0.02 |
1,000,000 insertBefore | 325.14 | 3.08 | 0.07 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 unshift | 226.92 | 4.41 | 0.05 |
1,000,000 unshift & shift | 169.36 | 5.90 | 0.04 |
1,000,000 insertBefore | 319.44 | 3.13 | 0.06 |
singly-linked-list
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 push & pop | 213.24 | 4.69 | 0.01 |
10,000 insertBefore | 247.69 | 4.04 | 0.01 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 push & pop | 226.29 | 4.42 | 0.02 |
10,000 insertBefore | 252.65 | 3.96 | 0.01 |
max-priority-queue
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 refill & poll | 11.50 | 86.97 | 1.99e-4 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
10,000 refill & poll | 11.64 | 85.91 | 2.88e-4 |
deque
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 223.30 | 4.48 | 0.08 |
1,000,000 shift | 24.86 | 40.23 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 222.81 | 4.49 | 0.06 |
1,000,000 shift | 26.80 | 37.31 | 0.00 |
queue
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 42.26 | 23.66 | 0.01 |
1,000,000 push & shift | 79.22 | 12.62 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
1,000,000 push | 45.90 | 21.79 | 0.01 |
1,000,000 push & shift | 81.24 | 12.31 | 0.00 |
trie
-
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 push | 52.92 | 18.90 | 0.00 |
100,000 getWords | 83.37 | 11.99 | 0.00 |
+
test name | time taken (ms) | executions per sec | sample deviation |
---|
100,000 push | 59.03 | 16.94 | 0.01 |
100,000 getWords | 89.17 | 11.21 | 0.00 |
[//]: # (End of Replace Section)
\ No newline at end of file
diff --git a/package.json b/package.json
index e159553c..4690f56e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "data-structure-typed",
- "version": "1.42.0",
+ "version": "1.42.1",
"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.",
"main": "dist/cjs/src/index.js",
"module": "dist/mjs/src/index.js",
diff --git a/test/utils/json2html.ts b/test/utils/json2html.ts
index 55f65048..8eefe334 100644
--- a/test/utils/json2html.ts
+++ b/test/utils/json2html.ts
@@ -109,7 +109,7 @@ function drawTable(arr: any[]): string {
const content = arr.map(rowObj => drawRow(cols, rowObj));
const headingHtml = '' + cols.join(' | ') + ' |
';
const contentHtml = '' + content.join('
') + '
';
- return '' + headingHtml + contentHtml + '
';
+ return '' + headingHtml + contentHtml + '
';
}
function _render(name: string, data: any, options: Json2htmlOptions, level: number, altRow: number): string {