data-structure-typed 1.42.0 → 1.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +24 -17
- package/benchmark/report.html +12 -12
- package/benchmark/report.json +107 -107
- package/package.json +1 -1
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +2 -3
- package/test/utils/json2html.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
|
10
10
|
|
|
11
|
-
## [v1.42.
|
|
11
|
+
## [v1.42.1](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
|
|
12
12
|
|
|
13
13
|
### Changes
|
|
14
14
|
|
package/README.md
CHANGED
|
@@ -280,6 +280,13 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
|
|
|
280
280
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
281
281
|
</tr>
|
|
282
282
|
<tr>
|
|
283
|
+
<td>Red Black Tree</td>
|
|
284
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
285
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
286
|
+
<td><a href="https://data-structure-typed-docs.vercel.app/classes/RedBlackTree.html"><span>AVLTree</span></a></td>
|
|
287
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
288
|
+
</tr>
|
|
289
|
+
<tr>
|
|
283
290
|
<td>Tree Multiset</td>
|
|
284
291
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
285
292
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
@@ -288,7 +295,7 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
|
|
|
288
295
|
</tr>
|
|
289
296
|
<tr>
|
|
290
297
|
<td>Segment Tree</td>
|
|
291
|
-
<td></td>
|
|
298
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
292
299
|
<td></td>
|
|
293
300
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/SegmentTree.html"><span>SegmentTree</span></a></td>
|
|
294
301
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
@@ -366,20 +373,20 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
|
|
|
366
373
|
<tr>
|
|
367
374
|
<td>Stack</td>
|
|
368
375
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
369
|
-
<td></td>
|
|
376
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
370
377
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/Stack.html"><span>Stack</span></a></td>
|
|
371
378
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
372
379
|
</tr>
|
|
373
380
|
<tr>
|
|
374
381
|
<td>Coordinate Set</td>
|
|
375
|
-
<td></td>
|
|
382
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
376
383
|
<td></td>
|
|
377
384
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/CoordinateSet.html"><span>CoordinateSet</span></a></td>
|
|
378
385
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
379
386
|
</tr>
|
|
380
387
|
<tr>
|
|
381
388
|
<td>Coordinate Map</td>
|
|
382
|
-
<td></td>
|
|
389
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
383
390
|
<td></td>
|
|
384
391
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/CoordinateMap.html"><span>CoordinateMap</span></a></td>
|
|
385
392
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
@@ -415,7 +422,7 @@ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D
|
|
|
415
422
|
<tr>
|
|
416
423
|
<td>Trie</td>
|
|
417
424
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
418
|
-
<td></td>
|
|
425
|
+
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
419
426
|
<td><a href="https://data-structure-typed-docs.vercel.app/classes/Trie.html"><span>Trie</span></a></td>
|
|
420
427
|
<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
|
|
421
428
|
</tr>
|
|
@@ -629,40 +636,40 @@ optimal approach to data structure design.
|
|
|
629
636
|
[//]: # (Start of Replace Section)
|
|
630
637
|
<div class="json-to-html-collapse clearfix 0">
|
|
631
638
|
<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
|
|
632
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
639
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>30.74</td><td>32.53</td><td>7.33e-4</td></tr><tr><td>10,000 add & delete randomly</td><td>67.99</td><td>14.71</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>39.82</td><td>25.11</td><td>4.59e-4</td></tr><tr><td>10,000 get</td><td>26.70</td><td>37.46</td><td>2.61e-4</td></tr></table></div>
|
|
633
640
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
634
641
|
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree</span></div>
|
|
635
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>
|
|
642
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>12.91</td><td>77.44</td><td>5.52e-4</td></tr><tr><td>1,000 add & delete randomly</td><td>15.90</td><td>62.88</td><td>1.24e-4</td></tr><tr><td>1,000 addMany</td><td>10.72</td><td>93.27</td><td>1.52e-4</td></tr><tr><td>1,000 get</td><td>18.39</td><td>54.39</td><td>2.28e-4</td></tr><tr><td>1,000 dfs</td><td>71.58</td><td>13.97</td><td>0.00</td></tr><tr><td>1,000 bfs</td><td>57.62</td><td>17.35</td><td>0.00</td></tr><tr><td>1,000 morris</td><td>37.17</td><td>26.90</td><td>2.13e-4</td></tr></table></div>
|
|
636
643
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
637
644
|
<div class='collapsible level0' ><span class='json-to-html-label'>bst</span></div>
|
|
638
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
645
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>30.50</td><td>32.79</td><td>0.00</td></tr><tr><td>10,000 add & delete randomly</td><td>68.35</td><td>14.63</td><td>8.92e-4</td></tr><tr><td>10,000 addMany</td><td>29.41</td><td>34.00</td><td>9.96e-4</td></tr><tr><td>10,000 get</td><td>28.27</td><td>35.37</td><td>5.46e-4</td></tr></table></div>
|
|
639
646
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
640
647
|
<div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
|
|
641
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>
|
|
648
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>82.19</td><td>12.17</td><td>0.01</td></tr><tr><td>100,000 add & 1000 delete randomly</td><td>99.74</td><td>10.03</td><td>0.03</td></tr><tr><td>100,000 getNode</td><td>78.27</td><td>12.78</td><td>0.04</td></tr></table></div>
|
|
642
649
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
643
650
|
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
|
|
644
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.
|
|
651
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>9687.71</td><td>1.14e-5</td></tr><tr><td>1,000 addEdge</td><td>7.42</td><td>134.68</td><td>0.00</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.05e+4</td><td>9.33e-6</td></tr><tr><td>1,000 getEdge</td><td>20.29</td><td>49.29</td><td>0.00</td></tr><tr><td>tarjan</td><td>190.48</td><td>5.25</td><td>0.01</td></tr><tr><td>tarjan all</td><td>190.72</td><td>5.24</td><td>0.00</td></tr><tr><td>topologicalSort</td><td>161.21</td><td>6.20</td><td>0.02</td></tr></table></div>
|
|
645
652
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
646
653
|
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
|
|
647
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>
|
|
654
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>4.70</td><td>212.55</td><td>5.89e-4</td></tr><tr><td>10,000 fib add & pop</td><td>366.96</td><td>2.73</td><td>0.02</td></tr></table></div>
|
|
648
655
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
649
656
|
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
|
|
650
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>
|
|
657
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>226.42</td><td>4.42</td><td>0.04</td></tr><tr><td>1,000,000 unshift & shift</td><td>163.14</td><td>6.13</td><td>0.01</td></tr><tr><td>1,000,000 insertBefore</td><td>343.18</td><td>2.91</td><td>0.08</td></tr></table></div>
|
|
651
658
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
652
659
|
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
|
|
653
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>
|
|
660
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>217.34</td><td>4.60</td><td>0.01</td></tr><tr><td>10,000 insertBefore</td><td>248.51</td><td>4.02</td><td>0.00</td></tr></table></div>
|
|
654
661
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
655
662
|
<div class='collapsible level0' ><span class='json-to-html-label'>max-priority-queue</span></div>
|
|
656
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>11.
|
|
663
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>11.65</td><td>85.81</td><td>3.52e-4</td></tr></table></div>
|
|
657
664
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
658
665
|
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
|
|
659
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>
|
|
666
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>224.57</td><td>4.45</td><td>0.04</td></tr><tr><td>1,000,000 shift</td><td>25.15</td><td>39.77</td><td>0.00</td></tr></table></div>
|
|
660
667
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
661
668
|
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
|
|
662
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>
|
|
669
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>43.52</td><td>22.98</td><td>0.01</td></tr><tr><td>1,000,000 push & shift</td><td>79.71</td><td>12.55</td><td>0.00</td></tr></table></div>
|
|
663
670
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
664
671
|
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
|
|
665
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>
|
|
672
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>59.28</td><td>16.87</td><td>0.00</td></tr><tr><td>100,000 getWords</td><td>106.79</td><td>9.36</td><td>0.00</td></tr></table></div>
|
|
666
673
|
</div>
|
|
667
674
|
|
|
668
675
|
[//]: # (End of Replace Section)
|
package/benchmark/report.html
CHANGED
|
@@ -43,40 +43,40 @@
|
|
|
43
43
|
<body>
|
|
44
44
|
<div id="json-to-html"><div class="json-to-html-collapse clearfix 0">
|
|
45
45
|
<div class='collapsible level0' ><span class='json-to-html-label'>avl-tree</span></div>
|
|
46
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
46
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>30.74</td><td>32.53</td><td>7.33e-4</td></tr><tr><td>10,000 add & delete randomly</td><td>67.99</td><td>14.71</td><td>0.00</td></tr><tr><td>10,000 addMany</td><td>39.82</td><td>25.11</td><td>4.59e-4</td></tr><tr><td>10,000 get</td><td>26.70</td><td>37.46</td><td>2.61e-4</td></tr></table></div>
|
|
47
47
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
48
48
|
<div class='collapsible level0' ><span class='json-to-html-label'>binary-tree</span></div>
|
|
49
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>
|
|
49
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 add randomly</td><td>12.91</td><td>77.44</td><td>5.52e-4</td></tr><tr><td>1,000 add & delete randomly</td><td>15.90</td><td>62.88</td><td>1.24e-4</td></tr><tr><td>1,000 addMany</td><td>10.72</td><td>93.27</td><td>1.52e-4</td></tr><tr><td>1,000 get</td><td>18.39</td><td>54.39</td><td>2.28e-4</td></tr><tr><td>1,000 dfs</td><td>71.58</td><td>13.97</td><td>0.00</td></tr><tr><td>1,000 bfs</td><td>57.62</td><td>17.35</td><td>0.00</td></tr><tr><td>1,000 morris</td><td>37.17</td><td>26.90</td><td>2.13e-4</td></tr></table></div>
|
|
50
50
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
51
51
|
<div class='collapsible level0' ><span class='json-to-html-label'>bst</span></div>
|
|
52
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>
|
|
52
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add randomly</td><td>30.50</td><td>32.79</td><td>0.00</td></tr><tr><td>10,000 add & delete randomly</td><td>68.35</td><td>14.63</td><td>8.92e-4</td></tr><tr><td>10,000 addMany</td><td>29.41</td><td>34.00</td><td>9.96e-4</td></tr><tr><td>10,000 get</td><td>28.27</td><td>35.37</td><td>5.46e-4</td></tr></table></div>
|
|
53
53
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
54
54
|
<div class='collapsible level0' ><span class='json-to-html-label'>rb-tree</span></div>
|
|
55
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>
|
|
55
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 add randomly</td><td>82.19</td><td>12.17</td><td>0.01</td></tr><tr><td>100,000 add & 1000 delete randomly</td><td>99.74</td><td>10.03</td><td>0.03</td></tr><tr><td>100,000 getNode</td><td>78.27</td><td>12.78</td><td>0.04</td></tr></table></div>
|
|
56
56
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
57
57
|
<div class='collapsible level0' ><span class='json-to-html-label'>directed-graph</span></div>
|
|
58
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.
|
|
58
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000 addVertex</td><td>0.10</td><td>9687.71</td><td>1.14e-5</td></tr><tr><td>1,000 addEdge</td><td>7.42</td><td>134.68</td><td>0.00</td></tr><tr><td>1,000 getVertex</td><td>0.05</td><td>2.05e+4</td><td>9.33e-6</td></tr><tr><td>1,000 getEdge</td><td>20.29</td><td>49.29</td><td>0.00</td></tr><tr><td>tarjan</td><td>190.48</td><td>5.25</td><td>0.01</td></tr><tr><td>tarjan all</td><td>190.72</td><td>5.24</td><td>0.00</td></tr><tr><td>topologicalSort</td><td>161.21</td><td>6.20</td><td>0.02</td></tr></table></div>
|
|
59
59
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
60
60
|
<div class='collapsible level0' ><span class='json-to-html-label'>heap</span></div>
|
|
61
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>
|
|
61
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 add & pop</td><td>4.70</td><td>212.55</td><td>5.89e-4</td></tr><tr><td>10,000 fib add & pop</td><td>366.96</td><td>2.73</td><td>0.02</td></tr></table></div>
|
|
62
62
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
63
63
|
<div class='collapsible level0' ><span class='json-to-html-label'>doubly-linked-list</span></div>
|
|
64
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>
|
|
64
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 unshift</td><td>226.42</td><td>4.42</td><td>0.04</td></tr><tr><td>1,000,000 unshift & shift</td><td>163.14</td><td>6.13</td><td>0.01</td></tr><tr><td>1,000,000 insertBefore</td><td>343.18</td><td>2.91</td><td>0.08</td></tr></table></div>
|
|
65
65
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
66
66
|
<div class='collapsible level0' ><span class='json-to-html-label'>singly-linked-list</span></div>
|
|
67
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>
|
|
67
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 push & pop</td><td>217.34</td><td>4.60</td><td>0.01</td></tr><tr><td>10,000 insertBefore</td><td>248.51</td><td>4.02</td><td>0.00</td></tr></table></div>
|
|
68
68
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
69
69
|
<div class='collapsible level0' ><span class='json-to-html-label'>max-priority-queue</span></div>
|
|
70
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>11.
|
|
70
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>10,000 refill & poll</td><td>11.65</td><td>85.81</td><td>3.52e-4</td></tr></table></div>
|
|
71
71
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
72
72
|
<div class='collapsible level0' ><span class='json-to-html-label'>deque</span></div>
|
|
73
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>
|
|
73
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>224.57</td><td>4.45</td><td>0.04</td></tr><tr><td>1,000,000 shift</td><td>25.15</td><td>39.77</td><td>0.00</td></tr></table></div>
|
|
74
74
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
75
75
|
<div class='collapsible level0' ><span class='json-to-html-label'>queue</span></div>
|
|
76
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>
|
|
76
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>1,000,000 push</td><td>43.52</td><td>22.98</td><td>0.01</td></tr><tr><td>1,000,000 push & shift</td><td>79.71</td><td>12.55</td><td>0.00</td></tr></table></div>
|
|
77
77
|
</div><div class="json-to-html-collapse clearfix 0">
|
|
78
78
|
<div class='collapsible level0' ><span class='json-to-html-label'>trie</span></div>
|
|
79
|
-
<div class="content"><table><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>
|
|
79
|
+
<div class="content"><table style="display: table; width:100%; table-layout: fixed;"><tr><th>test name</th><th>time taken (ms)</th><th>executions per sec</th><th>sample deviation</th></tr><tr><td>100,000 push</td><td>59.28</td><td>16.87</td><td>0.00</td></tr><tr><td>100,000 getWords</td><td>106.79</td><td>9.36</td><td>0.00</td></tr></table></div>
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
82
|
</div>
|
package/benchmark/report.json
CHANGED
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
"benchmarks": [
|
|
4
4
|
{
|
|
5
5
|
"test name": "10,000 add randomly",
|
|
6
|
-
"time taken (ms)": "
|
|
7
|
-
"executions per sec": "
|
|
8
|
-
"sample deviation": "
|
|
6
|
+
"time taken (ms)": "30.74",
|
|
7
|
+
"executions per sec": "32.53",
|
|
8
|
+
"sample deviation": "7.33e-4"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"test name": "10,000 add & delete randomly",
|
|
12
|
-
"time taken (ms)": "
|
|
13
|
-
"executions per sec": "
|
|
12
|
+
"time taken (ms)": "67.99",
|
|
13
|
+
"executions per sec": "14.71",
|
|
14
14
|
"sample deviation": "0.00"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"test name": "10,000 addMany",
|
|
18
|
-
"time taken (ms)": "
|
|
19
|
-
"executions per sec": "
|
|
20
|
-
"sample deviation": "
|
|
18
|
+
"time taken (ms)": "39.82",
|
|
19
|
+
"executions per sec": "25.11",
|
|
20
|
+
"sample deviation": "4.59e-4"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"test name": "10,000 get",
|
|
24
|
-
"time taken (ms)": "
|
|
25
|
-
"executions per sec": "
|
|
26
|
-
"sample deviation": "
|
|
24
|
+
"time taken (ms)": "26.70",
|
|
25
|
+
"executions per sec": "37.46",
|
|
26
|
+
"sample deviation": "2.61e-4"
|
|
27
27
|
}
|
|
28
28
|
],
|
|
29
29
|
"testName": "avl-tree"
|
|
@@ -32,45 +32,45 @@
|
|
|
32
32
|
"benchmarks": [
|
|
33
33
|
{
|
|
34
34
|
"test name": "1,000 add randomly",
|
|
35
|
-
"time taken (ms)": "
|
|
36
|
-
"executions per sec": "
|
|
37
|
-
"sample deviation": "
|
|
35
|
+
"time taken (ms)": "12.91",
|
|
36
|
+
"executions per sec": "77.44",
|
|
37
|
+
"sample deviation": "5.52e-4"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"test name": "1,000 add & delete randomly",
|
|
41
|
-
"time taken (ms)": "
|
|
42
|
-
"executions per sec": "
|
|
43
|
-
"sample deviation": "
|
|
41
|
+
"time taken (ms)": "15.90",
|
|
42
|
+
"executions per sec": "62.88",
|
|
43
|
+
"sample deviation": "1.24e-4"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"test name": "1,000 addMany",
|
|
47
|
-
"time taken (ms)": "10.
|
|
48
|
-
"executions per sec": "
|
|
49
|
-
"sample deviation": "1.
|
|
47
|
+
"time taken (ms)": "10.72",
|
|
48
|
+
"executions per sec": "93.27",
|
|
49
|
+
"sample deviation": "1.52e-4"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"test name": "1,000 get",
|
|
53
|
-
"time taken (ms)": "18.
|
|
54
|
-
"executions per sec": "
|
|
55
|
-
"sample deviation": "
|
|
53
|
+
"time taken (ms)": "18.39",
|
|
54
|
+
"executions per sec": "54.39",
|
|
55
|
+
"sample deviation": "2.28e-4"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"test name": "1,000 dfs",
|
|
59
|
-
"time taken (ms)": "71.
|
|
60
|
-
"executions per sec": "13.
|
|
59
|
+
"time taken (ms)": "71.58",
|
|
60
|
+
"executions per sec": "13.97",
|
|
61
61
|
"sample deviation": "0.00"
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"test name": "1,000 bfs",
|
|
65
|
-
"time taken (ms)": "57.
|
|
66
|
-
"executions per sec": "17.
|
|
67
|
-
"sample deviation": "
|
|
65
|
+
"time taken (ms)": "57.62",
|
|
66
|
+
"executions per sec": "17.35",
|
|
67
|
+
"sample deviation": "0.00"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"test name": "1,000 morris",
|
|
71
|
-
"time taken (ms)": "37.
|
|
72
|
-
"executions per sec": "26.
|
|
73
|
-
"sample deviation": "2.
|
|
71
|
+
"time taken (ms)": "37.17",
|
|
72
|
+
"executions per sec": "26.90",
|
|
73
|
+
"sample deviation": "2.13e-4"
|
|
74
74
|
}
|
|
75
75
|
],
|
|
76
76
|
"testName": "binary-tree"
|
|
@@ -79,27 +79,27 @@
|
|
|
79
79
|
"benchmarks": [
|
|
80
80
|
{
|
|
81
81
|
"test name": "10,000 add randomly",
|
|
82
|
-
"time taken (ms)": "
|
|
83
|
-
"executions per sec": "
|
|
84
|
-
"sample deviation": "
|
|
82
|
+
"time taken (ms)": "30.50",
|
|
83
|
+
"executions per sec": "32.79",
|
|
84
|
+
"sample deviation": "0.00"
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"test name": "10,000 add & delete randomly",
|
|
88
|
-
"time taken (ms)": "
|
|
89
|
-
"executions per sec": "
|
|
90
|
-
"sample deviation": "
|
|
88
|
+
"time taken (ms)": "68.35",
|
|
89
|
+
"executions per sec": "14.63",
|
|
90
|
+
"sample deviation": "8.92e-4"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"test name": "10,000 addMany",
|
|
94
|
-
"time taken (ms)": "
|
|
95
|
-
"executions per sec": "
|
|
96
|
-
"sample deviation": "
|
|
94
|
+
"time taken (ms)": "29.41",
|
|
95
|
+
"executions per sec": "34.00",
|
|
96
|
+
"sample deviation": "9.96e-4"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"test name": "10,000 get",
|
|
100
|
-
"time taken (ms)": "
|
|
101
|
-
"executions per sec": "
|
|
102
|
-
"sample deviation": "
|
|
100
|
+
"time taken (ms)": "28.27",
|
|
101
|
+
"executions per sec": "35.37",
|
|
102
|
+
"sample deviation": "5.46e-4"
|
|
103
103
|
}
|
|
104
104
|
],
|
|
105
105
|
"testName": "bst"
|
|
@@ -108,21 +108,21 @@
|
|
|
108
108
|
"benchmarks": [
|
|
109
109
|
{
|
|
110
110
|
"test name": "100,000 add randomly",
|
|
111
|
-
"time taken (ms)": "
|
|
112
|
-
"executions per sec": "12.
|
|
111
|
+
"time taken (ms)": "82.19",
|
|
112
|
+
"executions per sec": "12.17",
|
|
113
113
|
"sample deviation": "0.01"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"test name": "100,000 add & 1000 delete randomly",
|
|
117
|
-
"time taken (ms)": "
|
|
118
|
-
"executions per sec": "
|
|
119
|
-
"sample deviation": "0.
|
|
117
|
+
"time taken (ms)": "99.74",
|
|
118
|
+
"executions per sec": "10.03",
|
|
119
|
+
"sample deviation": "0.03"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"test name": "100,000 getNode",
|
|
123
|
-
"time taken (ms)": "
|
|
124
|
-
"executions per sec": "
|
|
125
|
-
"sample deviation": "0.
|
|
123
|
+
"time taken (ms)": "78.27",
|
|
124
|
+
"executions per sec": "12.78",
|
|
125
|
+
"sample deviation": "0.04"
|
|
126
126
|
}
|
|
127
127
|
],
|
|
128
128
|
"testName": "rb-tree"
|
|
@@ -131,45 +131,45 @@
|
|
|
131
131
|
"benchmarks": [
|
|
132
132
|
{
|
|
133
133
|
"test name": "1,000 addVertex",
|
|
134
|
-
"time taken (ms)": "0.
|
|
135
|
-
"executions per sec": "
|
|
136
|
-
"sample deviation": "
|
|
134
|
+
"time taken (ms)": "0.10",
|
|
135
|
+
"executions per sec": "9687.71",
|
|
136
|
+
"sample deviation": "1.14e-5"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"test name": "1,000 addEdge",
|
|
140
|
-
"time taken (ms)": "
|
|
141
|
-
"executions per sec": "
|
|
140
|
+
"time taken (ms)": "7.42",
|
|
141
|
+
"executions per sec": "134.68",
|
|
142
142
|
"sample deviation": "0.00"
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
145
|
"test name": "1,000 getVertex",
|
|
146
146
|
"time taken (ms)": "0.05",
|
|
147
|
-
"executions per sec": "
|
|
148
|
-
"sample deviation": "
|
|
147
|
+
"executions per sec": "2.05e+4",
|
|
148
|
+
"sample deviation": "9.33e-6"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"test name": "1,000 getEdge",
|
|
152
|
-
"time taken (ms)": "
|
|
153
|
-
"executions per sec": "
|
|
154
|
-
"sample deviation": "0.
|
|
152
|
+
"time taken (ms)": "20.29",
|
|
153
|
+
"executions per sec": "49.29",
|
|
154
|
+
"sample deviation": "0.00"
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
"test name": "tarjan",
|
|
158
|
-
"time taken (ms)": "
|
|
159
|
-
"executions per sec": "
|
|
160
|
-
"sample deviation": "0.
|
|
158
|
+
"time taken (ms)": "190.48",
|
|
159
|
+
"executions per sec": "5.25",
|
|
160
|
+
"sample deviation": "0.01"
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
"test name": "tarjan all",
|
|
164
|
-
"time taken (ms)": "
|
|
165
|
-
"executions per sec": "
|
|
166
|
-
"sample deviation": "0.
|
|
164
|
+
"time taken (ms)": "190.72",
|
|
165
|
+
"executions per sec": "5.24",
|
|
166
|
+
"sample deviation": "0.00"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"test name": "topologicalSort",
|
|
170
|
-
"time taken (ms)": "
|
|
171
|
-
"executions per sec": "
|
|
172
|
-
"sample deviation": "0.
|
|
170
|
+
"time taken (ms)": "161.21",
|
|
171
|
+
"executions per sec": "6.20",
|
|
172
|
+
"sample deviation": "0.02"
|
|
173
173
|
}
|
|
174
174
|
],
|
|
175
175
|
"testName": "directed-graph"
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
"benchmarks": [
|
|
179
179
|
{
|
|
180
180
|
"test name": "10,000 add & pop",
|
|
181
|
-
"time taken (ms)": "
|
|
182
|
-
"executions per sec": "
|
|
183
|
-
"sample deviation": "
|
|
181
|
+
"time taken (ms)": "4.70",
|
|
182
|
+
"executions per sec": "212.55",
|
|
183
|
+
"sample deviation": "5.89e-4"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"test name": "10,000 fib add & pop",
|
|
187
|
-
"time taken (ms)": "
|
|
188
|
-
"executions per sec": "2.
|
|
189
|
-
"sample deviation": "0.
|
|
187
|
+
"time taken (ms)": "366.96",
|
|
188
|
+
"executions per sec": "2.73",
|
|
189
|
+
"sample deviation": "0.02"
|
|
190
190
|
}
|
|
191
191
|
],
|
|
192
192
|
"testName": "heap"
|
|
@@ -195,21 +195,21 @@
|
|
|
195
195
|
"benchmarks": [
|
|
196
196
|
{
|
|
197
197
|
"test name": "1,000,000 unshift",
|
|
198
|
-
"time taken (ms)": "
|
|
199
|
-
"executions per sec": "4.
|
|
200
|
-
"sample deviation": "0.
|
|
198
|
+
"time taken (ms)": "226.42",
|
|
199
|
+
"executions per sec": "4.42",
|
|
200
|
+
"sample deviation": "0.04"
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"test name": "1,000,000 unshift & shift",
|
|
204
|
-
"time taken (ms)": "163.
|
|
205
|
-
"executions per sec": "6.
|
|
204
|
+
"time taken (ms)": "163.14",
|
|
205
|
+
"executions per sec": "6.13",
|
|
206
206
|
"sample deviation": "0.01"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"test name": "1,000,000 insertBefore",
|
|
210
|
-
"time taken (ms)": "
|
|
211
|
-
"executions per sec": "
|
|
212
|
-
"sample deviation": "0.
|
|
210
|
+
"time taken (ms)": "343.18",
|
|
211
|
+
"executions per sec": "2.91",
|
|
212
|
+
"sample deviation": "0.08"
|
|
213
213
|
}
|
|
214
214
|
],
|
|
215
215
|
"testName": "doubly-linked-list"
|
|
@@ -218,15 +218,15 @@
|
|
|
218
218
|
"benchmarks": [
|
|
219
219
|
{
|
|
220
220
|
"test name": "10,000 push & pop",
|
|
221
|
-
"time taken (ms)": "
|
|
222
|
-
"executions per sec": "4.
|
|
221
|
+
"time taken (ms)": "217.34",
|
|
222
|
+
"executions per sec": "4.60",
|
|
223
223
|
"sample deviation": "0.01"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
"test name": "10,000 insertBefore",
|
|
227
|
-
"time taken (ms)": "
|
|
228
|
-
"executions per sec": "
|
|
229
|
-
"sample deviation": "0.
|
|
227
|
+
"time taken (ms)": "248.51",
|
|
228
|
+
"executions per sec": "4.02",
|
|
229
|
+
"sample deviation": "0.00"
|
|
230
230
|
}
|
|
231
231
|
],
|
|
232
232
|
"testName": "singly-linked-list"
|
|
@@ -235,9 +235,9 @@
|
|
|
235
235
|
"benchmarks": [
|
|
236
236
|
{
|
|
237
237
|
"test name": "10,000 refill & poll",
|
|
238
|
-
"time taken (ms)": "11.
|
|
239
|
-
"executions per sec": "
|
|
240
|
-
"sample deviation": "
|
|
238
|
+
"time taken (ms)": "11.65",
|
|
239
|
+
"executions per sec": "85.81",
|
|
240
|
+
"sample deviation": "3.52e-4"
|
|
241
241
|
}
|
|
242
242
|
],
|
|
243
243
|
"testName": "max-priority-queue"
|
|
@@ -246,14 +246,14 @@
|
|
|
246
246
|
"benchmarks": [
|
|
247
247
|
{
|
|
248
248
|
"test name": "1,000,000 push",
|
|
249
|
-
"time taken (ms)": "
|
|
250
|
-
"executions per sec": "4.
|
|
251
|
-
"sample deviation": "0.
|
|
249
|
+
"time taken (ms)": "224.57",
|
|
250
|
+
"executions per sec": "4.45",
|
|
251
|
+
"sample deviation": "0.04"
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
"test name": "1,000,000 shift",
|
|
255
|
-
"time taken (ms)": "
|
|
256
|
-
"executions per sec": "
|
|
255
|
+
"time taken (ms)": "25.15",
|
|
256
|
+
"executions per sec": "39.77",
|
|
257
257
|
"sample deviation": "0.00"
|
|
258
258
|
}
|
|
259
259
|
],
|
|
@@ -263,14 +263,14 @@
|
|
|
263
263
|
"benchmarks": [
|
|
264
264
|
{
|
|
265
265
|
"test name": "1,000,000 push",
|
|
266
|
-
"time taken (ms)": "
|
|
267
|
-
"executions per sec": "22.
|
|
266
|
+
"time taken (ms)": "43.52",
|
|
267
|
+
"executions per sec": "22.98",
|
|
268
268
|
"sample deviation": "0.01"
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
"test name": "1,000,000 push & shift",
|
|
272
|
-
"time taken (ms)": "
|
|
273
|
-
"executions per sec": "12.
|
|
272
|
+
"time taken (ms)": "79.71",
|
|
273
|
+
"executions per sec": "12.55",
|
|
274
274
|
"sample deviation": "0.00"
|
|
275
275
|
}
|
|
276
276
|
],
|
|
@@ -280,15 +280,15 @@
|
|
|
280
280
|
"benchmarks": [
|
|
281
281
|
{
|
|
282
282
|
"test name": "100,000 push",
|
|
283
|
-
"time taken (ms)": "
|
|
284
|
-
"executions per sec": "
|
|
285
|
-
"sample deviation": "0.
|
|
283
|
+
"time taken (ms)": "59.28",
|
|
284
|
+
"executions per sec": "16.87",
|
|
285
|
+
"sample deviation": "0.00"
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
"test name": "100,000 getWords",
|
|
289
|
-
"time taken (ms)": "
|
|
290
|
-
"executions per sec": "
|
|
291
|
-
"sample deviation": "0.
|
|
289
|
+
"time taken (ms)": "106.79",
|
|
290
|
+
"executions per sec": "9.36",
|
|
291
|
+
"sample deviation": "0.00"
|
|
292
292
|
}
|
|
293
293
|
],
|
|
294
294
|
"testName": "trie"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-structure-typed",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.1",
|
|
4
4
|
"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.",
|
|
5
5
|
"main": "dist/cjs/src/index.js",
|
|
6
6
|
"module": "dist/mjs/src/index.js",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {AVLTree, AVLTreeNode, BinaryTree, BinaryTreeNode, IterationType} from '../../../../src';
|
|
2
|
-
import {isDebugTest} from '../../../config';
|
|
2
|
+
// import {isDebugTest} from '../../../config';
|
|
3
3
|
|
|
4
|
-
const isDebug = isDebugTest;
|
|
5
|
-
// const isDebug = true;
|
|
4
|
+
// const isDebug = isDebugTest;
|
|
6
5
|
|
|
7
6
|
describe('BinaryTreeNode', () => {
|
|
8
7
|
it('should create an instance of BinaryTreeNode', () => {
|
package/test/utils/json2html.ts
CHANGED
|
@@ -109,7 +109,7 @@ function drawTable(arr: any[]): string {
|
|
|
109
109
|
const content = arr.map(rowObj => drawRow(cols, rowObj));
|
|
110
110
|
const headingHtml = '<tr><th>' + cols.join('</th><th>') + '</th></tr>';
|
|
111
111
|
const contentHtml = '<tr>' + content.join('</tr><tr>') + '</tr>';
|
|
112
|
-
return '<table>' + headingHtml + contentHtml + '</table>';
|
|
112
|
+
return '<table style="display: table; width:100%; table-layout: fixed;">' + headingHtml + contentHtml + '</table>';
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
function _render(name: string, data: any, options: Json2htmlOptions, level: number, altRow: number): string {
|