# Data Structure Typed ![NPM](https://img.shields.io/npm/l/data-structure-typed) ![GitHub top language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed) ![npm](https://img.shields.io/npm/dw/data-structure-typed) ![eslint](https://aleen42.github.io/badges/src/eslint.svg) ![npm package minimized gzipped size (select exports)](https://img.shields.io/bundlejs/size/data-structure-typed) ![npm bundle size](https://img.shields.io/bundlephobia/min/data-structure-typed) ![npm](https://img.shields.io/npm/v/data-structure-typed) Data Structures of Javascript & TypeScript. Do you envy C++ with [STL](), Python with [collections](), and Java with [java.util]() ? Well, no need to envy anymore! JavaScript and TypeScript now have [data-structure-typed](). Now you can use this library in Node.js and browser environments in CommonJS(require export.modules = ), ESModule(import export), Typescript(import export), UMD(var Queue = dataStructureTyped.Queue) [//]: # (![Branches](https://img.shields.io/badge/branches-55.47%25-red.svg?style=flat)) [//]: # (![Statements](https://img.shields.io/badge/statements-67%25-red.svg?style=flat)) [//]: # (![Functions](https://img.shields.io/badge/functions-66.38%25-red.svg?style=flat)) [//]: # (![Lines](https://img.shields.io/badge/lines-68.6%25-red.svg?style=flat)) ## Built-in classic algorithms DFS(Depth-First Search), DFSIterative, BFS(Breadth-First Search), morris, Bellman-Ford Algorithm, Dijkstra's Algorithm, Floyd-Warshall Algorithm, Tarjan's Algorithm. ## Installation and Usage ### npm ```bash npm i data-structure-typed --save ``` ### yarn ```bash yarn add data-structure-typed ``` ```js import { BinaryTree, Graph, Queue, Stack, PriorityQueue, BST, Trie, DoublyLinkedList, AVLTree, MinHeap, SinglyLinkedList, DirectedGraph, TreeMultiset, DirectedVertex, AVLTreeNode } from 'data-structure-typed'; ``` ### CDN ```html ``` ```js const {Heap} = dataStructureTyped; const { BinaryTree, Graph, Queue, Stack, PriorityQueue, BST, Trie, DoublyLinkedList, AVLTree, MinHeap, SinglyLinkedList, DirectedGraph, TreeMultiset, DirectedVertex, AVLTreeNode } = dataStructureTyped; ``` ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/binary-tree-array-to-binary-tree.webp) ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/binary-tree-dfs-in-order.webp) ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/avl-tree-test.webp) ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/tree-multiset-test.webp) ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/matrix-cut-off-tree-for-golf.webp) ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/directed-graph-test.webp) ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/map-graph-test.webp) ## API docs & Examples [API Docs](https://data-structure-typed-docs.vercel.app) [Live Examples](https://vivid-algorithm.vercel.app) Examples Repository ## Code Snippet ### Binary Search Tree (BST) snippet #### TS ```ts import {BST, BSTNode} from 'data-structure-typed'; const bst = new BST(); bst.add(11); bst.add(3); bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]); bst.size === 16; // true bst.has(6); // true const node6 = bst.get(6); // BSTNode bst.getHeight(6) === 2; // true bst.getHeight() === 5; // true bst.getDepth(6) === 3; // true bst.getLeftMost()?.id === 1; // true bst.delete(6); bst.get(6); // null bst.isAVLBalanced(); // true bst.bfs()[0] === 11; // true const objBST = new BST>(); objBST.add(11, {id: 11, keyA: 11}); objBST.add(3, {id: 3, keyA: 3}); objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8}, {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2}, {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12}, {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7}, {id: 10, keyA: 10}, {id: 5, keyA: 5}]); objBST.delete(11); ``` #### JS ```js const {BST, BSTNode} = require('data-structure-typed'); const bst = new BST(); bst.add(11); bst.add(3); bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]); bst.size === 16; // true bst.has(6); // true const node6 = bst.get(6); bst.getHeight(6) === 2; // true bst.getHeight() === 5; // true bst.getDepth(6) === 3; // true const leftMost = bst.getLeftMost(); leftMost?.id === 1; // true expect(leftMost?.id).toBe(1); bst.delete(6); bst.get(6); // null bst.isAVLBalanced(); // true or false const bfsIDs = bst.bfs(); bfsIDs[0] === 11; // true expect(bfsIDs[0]).toBe(11); const objBST = new BST(); objBST.add(11, {id: 11, keyA: 11}); objBST.add(3, {id: 3, keyA: 3}); objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8}, {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2}, {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12}, {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7}, {id: 10, keyA: 10}, {id: 5, keyA: 5}]); objBST.delete(11); const avlTree = new AVLTree(); avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) avlTree.isAVLBalanced(); // true avlTree.delete(10); avlTree.isAVLBalanced(); // true ``` ### AVLTree snippet #### TS ```ts import {AVLTree} from 'data-structure-typed'; const avlTree = new AVLTree(); avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) avlTree.isAVLBalanced(); // true avlTree.delete(10); avlTree.isAVLBalanced(); // true ``` #### JS ```js const {AVLTree} = require('data-structure-typed'); const avlTree = new AVLTree(); avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]) avlTree.isAVLBalanced(); // true avlTree.delete(10); avlTree.isAVLBalanced(); // true ``` ### Directed Graph simple snippet #### TS or JS ```ts import {DirectedGraph} from 'data-structure-typed'; const graph = new DirectedGraph(); graph.addVertex('A'); graph.addVertex('B'); graph.hasVertex('A'); // true graph.hasVertex('B'); // true graph.hasVertex('C'); // false graph.addEdge('A', 'B'); graph.hasEdge('A', 'B'); // true graph.hasEdge('B', 'A'); // false graph.deleteEdgeSrcToDest('A', 'B'); graph.hasEdge('A', 'B'); // false graph.addVertex('C'); graph.addEdge('A', 'B'); graph.addEdge('B', 'C'); const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C'] ``` ### Undirected Graph snippet #### TS or JS ```ts import {UndirectedGraph} from 'data-structure-typed'; const graph = new UndirectedGraph(); graph.addVertex('A'); graph.addVertex('B'); graph.addVertex('C'); graph.addVertex('D'); graph.deleteVertex('C'); graph.addEdge('A', 'B'); graph.addEdge('B', 'D'); const dijkstraResult = graph.dijkstra('A'); Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D'] ``` ## Data Structures
Data Structure Unit Test Performance Test API Documentation Implemented
Binary Tree Binary Tree
Binary Search Tree (BST) BST
AVL Tree AVLTree
Tree Multiset TreeMultiset
Segment Tree SegmentTree
Binary Indexed Tree BinaryIndexedTree
Graph AbstractGraph
Directed Graph DirectedGraph
Undirected Graph UndirectedGraph
Linked List SinglyLinkedList
Singly Linked List SinglyLinkedList
Doubly Linked List DoublyLinkedList
Queue Queue
Object Deque ObjectDeque
Array Deque ArrayDeque
Stack Stack
Coordinate Set CoordinateSet
Coordinate Map CoordinateMap
Heap Heap
Priority Queue PriorityQueue
Max Priority Queue MaxPriorityQueue
Min Priority Queue MinPriorityQueue
Trie Trie
### Standard library data structure comparison
Data Structure Data Structure Typed C++ STL java.util Python collections
Dynamic Array Array<E> vector<T> ArrayList<E> list
Linked List DoublyLinkedList<E> list<T> LinkedList<E> deque
Singly Linked List SinglyLinkedList<E> - - -
Set Set<E> set<T> HashSet<E> set
Map Map<K, V> map<K, V> HashMap<K, V> dict
Ordered Dictionary Map<K, V> - - OrderedDict
Queue Queue<E> queue<T> Queue<E> -
Priority Queue PriorityQueue<E> priority_queue<T> PriorityQueue<E> -
Heap Heap<V> priority_queue<T> PriorityQueue<E> heapq
Stack Stack<E> stack<T> Stack<E> -
Deque Deque<E> deque<T> - -
Trie Trie - - -
Unordered Map HashMap<K, V> unordered_map<K, V> HashMap<K, V> defaultdict
Multiset - multiset<T> - -
Multimap - multimap<K, V> - -
Binary Tree BinaryTree<K, V> - - -
Binary Search Tree BST<K, V> - - -
Directed Graph DirectedGraph<V, E> - - -
Undirected Graph UndirectedGraph<V, E> - - -
Unordered Multiset - unordered_multiset - Counter
Linked Hash Set - - LinkedHashSet<E> -
Linked Hash Map - - LinkedHashMap<K, V> -
Sorted Set AVLTree<E> - TreeSet<E> -
Sorted Map AVLTree<K, V> - TreeMap<K, V> -
Tree Set AVLTree<E> set TreeSet<E> -
Unordered Multimap - unordered_multimap<K, V> - -
Bitset - bitset<N> - -
Unordered Set - unordered_set<T> HashSet<E> -
## Code design ### Adhere to ES6 standard naming conventions for APIs. Standardize API conventions by using 'add' and 'delete' for element manipulation methods in all data structures. Opt for concise and clear method names, avoiding excessive length while ensuring explicit intent. ### Object-oriented programming(OOP) By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> TreeMultiset), you can seamlessly inherit the existing data structures to implement the customized ones you need. Object-oriented design stands as the optimal approach to data structure design. ## Benchmark
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.18458.66240.002.36e-5
1000 add & delete randomly11.0790.3350.011.53e-4
1000 addMany2.89346.20180.002.52e-5
1000 get24.1941.3430.021.67e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.8877.6540.013.26e-4
1000 add & delete randomly15.7163.6540.021.42e-4
1000 addMany10.6494.0250.011.79e-4
1000 get24.0641.5630.023.48e-4
1000 dfs72.2113.8510.070.00
1000 bfs54.7418.2710.054.33e-4
1000 morris37.2626.8420.040.00
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.16462.35240.001.86e-5
1000 add & delete randomly13.5473.8750.013.91e-4
1000 addMany2.12472.08250.002.86e-5
1000 get25.2639.6030.031.83e-4
directed-graph
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.109972.075091.00e-41.01e-6
1000 addEdge6.12163.3590.014.88e-4
1000 getVertex0.052.17e+410994.60e-54.25e-7
1000 getEdge23.2043.1130.020.00
tarjan211.964.7210.210.01
tarjan all214.884.6510.210.00
topologicalSort173.465.7610.170.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342922.291493.42e-42.94e-6
1000 fib add & pop3.90256.37140.004.30e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift209.624.7710.210.05
1000000 unshift & shift171.615.8310.170.04
1000 insertBefore0.033.19e+419083.13e-54.47e-5
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.75571.57300.002.44e-5
1000 insertBefore2.31433.19230.005.11e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.3388.3050.011.41e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push195.145.1210.200.04
1000000 shift26.2438.1030.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.3022.5720.040.01
1000000 push & shift79.5412.5710.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push56.0017.8610.060.00
100000 getWords101.669.8410.100.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.17460.58240.002.54e-5
1000 add & delete randomly11.2389.0550.011.99e-4
1000 addMany2.87348.16180.003.30e-5
1000 get24.5340.7730.022.11e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly13.3974.6950.019.80e-4
1000 add & delete randomly16.2861.4440.029.38e-4
1000 addMany10.9491.4450.015.48e-4
1000 get24.3541.0630.020.00
1000 dfs74.5113.4210.070.00
1000 bfs56.9517.5610.060.00
1000 morris38.5925.9120.040.00
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.03493.40260.006.59e-5
1000 add & delete randomly12.8777.7050.015.53e-4
1000 addMany2.14466.33250.001.21e-4
1000 get25.9338.5620.039.04e-4
directed-graph
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 addVertex0.119341.594871.07e-44.65e-6
1000 addEdge0.011.53e+584596.55e-68.65e-7
1000 getVertex5.06e-51.98e+71e+65.06e-82.36e-9
1000 getEdge0.024.40e+423562.27e-51.22e-6
1000 tarjan [needArticulationPoints]204.764.8810.200.01
1000 tarjan all204.674.8910.200.00
1000 topologicalSort168.385.9410.170.01
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342913.641493.43e-45.05e-6
1000 fib add & pop3.93254.43130.005.15e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift227.994.3910.230.07
1000000 unshift & shift176.475.6710.180.03
1000 insertBefore0.033.72e+419062.69e-53.49e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.78562.61300.006.55e-5
1000 insertBefore2.35425.30220.008.54e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.7385.2850.017.65e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push227.874.3910.230.07
1000000 shift25.0839.8830.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push43.1023.2020.040.01
1000000 push & shift88.4111.3110.090.04
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push50.4119.8420.050.00
100000 getWords103.019.7110.100.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.28437.87230.001.95e-4
1000 add & delete randomly11.1689.6250.011.41e-4
1000 addMany3.00333.18170.002.62e-5
1000 get24.2741.2030.021.60e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.9477.2850.012.22e-4
1000 add & delete randomly15.8563.1140.022.55e-4
1000 addMany10.6493.9550.013.08e-4
1000 get23.6742.2430.021.79e-4
1000 dfs72.1413.8610.075.13e-4
1000 bfs54.7418.2710.054.80e-4
1000 morris37.0427.0020.042.48e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.09477.97250.001.43e-5
1000 add & delete randomly12.9277.4240.012.78e-4
1000 addMany2.20454.39240.003.52e-5
1000 get25.1839.7130.031.71e-4
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342914.731493.43e-48.46e-6
1000 fib add & pop3.92254.88140.006.46e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift194.965.1310.190.04
1000000 unshift & shift154.706.4610.150.02
1000 insertBefore0.033.71e+419212.70e-56.61e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77565.65300.004.37e-5
1000 insertBefore2.32431.45220.004.01e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.6785.6750.013.92e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push212.304.7110.210.04
1000000 shift25.1739.7330.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.6522.3920.040.01
1000000 push & shift80.6612.4010.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push64.8115.4310.060.01
100000 getWords126.977.8810.130.02
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.10475.11250.002.06e-5
1000 add & delete randomly11.1489.7850.012.22e-4
1000 addMany2.89346.01180.007.29e-5
1000 get24.3541.0730.021.56e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly12.8078.1150.017.83e-5
1000 add & delete randomly15.6363.9740.029.29e-5
1000 addMany10.5894.5350.011.21e-4
1000 get23.6342.3130.021.97e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.31433.05220.005.43e-5
1000 add & delete randomly13.9071.9240.013.66e-4
1000 addMany2.13469.94250.004.34e-5
1000 get25.9538.5420.036.68e-4
1000 dfs73.6813.5710.070.00
1000 bfs59.2916.8710.060.01
1000 morris37.8426.4320.040.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342913.151493.43e-42.85e-6
1000 fib add & pop3.91255.50140.006.06e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift204.444.8910.200.03
1000000 unshift & shift153.336.5210.150.03
1000 insertBefore0.033.79e+419242.64e-53.02e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77564.14300.005.34e-5
1000 insertBefore2.32431.40220.007.10e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.3488.1850.011.37e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push194.395.1410.190.04
1000000 shift25.4539.2930.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push42.4323.5720.040.01
1000000 push & shift79.4712.5810.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push54.4118.3810.050.00
100000 getWords103.789.6410.100.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.13468.81240.001.71e-5
1000 add & delete randomly11.7285.3650.010.00
1000 addMany2.54393.52200.002.31e-5
1000 get24.4140.9730.022.33e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add66.2515.0930.070.00
1000 delete22.0045.4410560.020.04
1000 addMany10.9591.3350.010.00
1000 get33.9529.4520.030.00
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.13468.52250.001.38e-4
1000 delete randomly0.051.97e+410425.08e-52.42e-6
1000 addMany balanced2.66375.97200.001.42e-4
1000 get57.2517.4710.060.01
1000 dfs176.135.6810.180.01
1000 bfs139.297.1810.140.01
1000 morris95.2310.5010.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342906.831483.44e-44.91e-6
1000 fib add & pop3.94253.80140.008.47e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift192.845.1910.190.04
1000000 unshift & shift172.255.8110.170.06
1000 insertBefore0.033.57e+418932.80e-51.34e-6
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.81553.05300.001.26e-4
1000 insertBefore2.33428.33220.005.84e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.6485.8950.014.05e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push187.655.3310.190.03
1000000 shift25.4839.2430.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.5122.4720.040.01
1000000 push & shift81.1212.3310.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push65.1915.3420.070.01
100000 getWords117.428.5210.120.02
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.21453.16230.002.00e-5
1000 add & delete randomly10.9691.2750.011.89e-4
1000 addMany2.61383.69200.007.84e-5
1000 get25.1339.7930.037.48e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add67.5014.8230.070.00
1000 delete23.9241.8010480.020.04
1000 addMany10.8292.4250.016.56e-4
1000 get33.2330.1020.034.01e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly1.96511.38270.003.28e-5
1000 delete randomly0.052.00e+410495.01e-55.38e-6
1000 addMany balanced2.66375.73200.001.64e-4
1000 get54.3118.4110.050.00
1000 dfs168.175.9510.170.00
1000 bfs147.476.7810.150.02
1000 morris104.119.6010.100.01
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.352832.051493.53e-45.74e-5
1000 fib add & pop4.02248.85140.005.56e-4
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift211.234.7310.210.03
1000000 unshift & shift180.125.5510.180.04
1000 insertBefore0.033.40e+418332.94e-54.38e-6
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.82550.20300.001.53e-4
1000 insertBefore2.37421.75220.002.85e-4
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.9883.4450.010.00
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push217.794.5910.220.02
1000000 shift27.9835.7430.030.01
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push44.7222.3620.040.01
1000000 push & shift78.6412.7210.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push59.2416.8810.060.01
100000 getWords110.049.0910.110.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.60384.09200.002.17e-5
1000 add & delete randomly11.5086.9650.011.09e-4
1000 addMany2.96337.68180.002.41e-5
1000 get24.3341.1030.021.87e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add66.6515.0030.070.00
1000 delete22.9443.5910480.020.04
1000 addMany10.4695.5950.011.06e-4
1000 get33.1630.1520.033.69e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.57388.55200.002.56e-5
1000 delete randomly0.052.05e+410774.87e-58.43e-7
1000 addMany balanced3.08324.33170.003.01e-5
1000 get54.0218.5110.050.00
1000 dfs169.215.9110.170.00
1000 bfs136.057.3510.140.00
1000 morris90.6011.0410.090.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342924.081493.42e-43.76e-6
1000 fib add & pop3.88258.00140.004.57e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift200.135.0010.200.04
1000000 unshift & shift151.886.5810.150.02
1000 insertBefore0.033.78e+419212.65e-54.68e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.77565.88300.004.84e-5
1000 insertBefore2.32431.01230.007.27e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.3987.8050.011.70e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push197.165.0710.200.03
1000000 shift25.3039.5230.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push43.5922.9420.040.01
1000000 push & shift79.4212.5910.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push54.9818.1910.050.00
100000 getWords122.288.1810.120.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.27440.05230.008.11e-5
1000 delete randomly0.051.85e+49485.40e-56.80e-7
1000 addMany2.99334.92180.003.05e-5
1000 get53.0918.8410.059.51e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add67.1114.9030.070.00
1000 delete22.1445.1610710.020.04
1000 addMany8.95111.7560.012.26e-4
1000 get31.5131.7320.033.98e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add randomly2.68373.07240.000.00
1000 delete randomly0.051.96e+410565.11e-53.03e-6
1000 addMany balanced2.68373.77200.006.55e-5
1000 get55.4118.0510.060.00
1000 dfs176.115.6810.180.00
1000 bfs140.037.1410.140.00
1000 morris102.459.7610.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 add & pop0.342916.001503.43e-41.26e-5
1000 fib add & pop4.62216.38140.000.00
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 unshift197.235.0710.200.03
1000000 unshift & shift162.696.1510.160.03
1000 insertBefore0.033.63e+419072.76e-57.08e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000 push & pop1.82549.57300.001.65e-4
1000 insertBefore2.33430.03220.005.59e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
10000 refill & poll11.4087.7150.011.55e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push194.905.1310.190.04
1000000 shift24.8340.2730.020.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
1000000 push41.7123.9720.040.00
1000000 push & shift78.7212.7010.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
100000 push53.8818.5610.059.89e-4
100000 getWords98.8210.1210.100.00
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.10475.20250.002.33e-5
delete 1000 randomly0.051.87e+49475.35e-53.85e-7
addMany 10002.89345.59180.002.62e-5
get 100052.0219.2220.059.28e-4
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.5815.0230.070.01
delete 100025.3439.468490.030.04
addMany 10008.78113.8560.019.87e-5
get 100031.2731.9820.032.82e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.15465.12240.001.88e-5
delete 1000 randomly0.052.08e+410914.80e-55.57e-7
addMany 1000 balanced2.51397.88210.003.54e-5
get 100056.5717.6810.060.00
dfs 1000170.585.8610.170.00
bfs 1000139.697.1610.140.00
morris 100097.3610.2710.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342923.161493.42e-44.01e-6
fib add & pop 10003.88257.61140.004.95e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000193.545.1710.190.03
unshift & shift 1000000164.746.0710.160.03
insertBefore 10000.033.72e+419082.69e-57.19e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.77565.06290.008.16e-5
insertBefore 10002.31433.08220.005.99e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 1000011.4087.7350.011.86e-4
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000210.404.7510.210.05
shift 100000025.1239.8030.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.1123.7520.040.00
push & shift 100000078.8212.6910.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000052.7218.9710.050.00
getWords 10000098.3610.1710.100.00
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.07482.88250.002.62e-5
delete 1000 randomly0.061.73e+49225.77e-55.23e-6
addMany 10002.87348.56180.002.76e-5
get 100052.0819.2020.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100067.6514.7830.070.00
delete 100023.3842.7810830.020.04
addMany 10008.81113.5560.018.24e-5
get 100032.1131.1520.034.49e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.15464.93240.002.37e-4
delete 1000 randomly0.052.08e+410624.81e-55.51e-7
addMany 1000 balanced2.51397.64210.005.50e-5
get 100057.8717.2810.060.01
dfs 1000168.095.9510.177.76e-4
bfs 1000143.736.9610.140.00
morris 100096.9710.3110.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342927.211493.42e-43.55e-6
fib add & pop 10003.91255.44140.001.98e-4
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000196.835.0810.200.02
unshift & shift 1000000152.506.5610.150.02
insertBefore 10000.033.78e+419222.65e-52.96e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.76569.49290.005.19e-5
insertBefore 10002.30435.27220.004.67e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001880.370.5311.880.06
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000210.284.7610.210.03
shift 100000024.4240.9430.020.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000041.7423.9620.040.00
push & shift 100000081.4812.2710.080.01
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000057.4417.4110.060.00
getWords 100000129.577.7210.130.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.09477.46250.002.54e-5
delete 1000 randomly0.061.78e+49195.61e-51.46e-6
addMany 10002.96337.92180.007.78e-5
get 100054.2518.4310.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100067.8014.7530.070.00
delete 100022.7943.8810940.020.04
addMany 10008.83113.2460.011.42e-4
get 100030.5232.7620.030.00
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.18459.02240.007.16e-5
delete 1000 randomly0.052.06e+410834.85e-51.15e-6
addMany 1000 balanced2.53394.85210.006.11e-5
get 100056.5117.7010.060.00
dfs 1000173.685.7610.170.00
bfs 1000156.936.3710.160.04
morris 100096.7110.3410.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.352876.021493.48e-44.35e-5
fib add & pop 10004.09244.66140.005.12e-4
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000210.784.7410.210.05
unshift & shift 1000000161.096.2110.160.03
insertBefore 10000.033.73e+419232.68e-58.43e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.85539.24300.002.91e-4
insertBefore 10002.35424.68220.002.11e-4
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001804.270.5511.800.02
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000221.644.5110.220.02
shift 100000025.7738.8030.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.2523.6720.040.01
push & shift 100000079.5312.5710.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000054.3318.4110.050.00
getWords 10000096.3810.3810.100.01
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.14468.25240.005.65e-5
delete 1000 randomly0.061.79e+49215.59e-52.02e-6
addMany 10002.91344.07180.006.78e-5
get 100051.8719.2820.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100068.3214.6430.070.01
delete 100023.8441.9510640.020.04
addMany 10008.88112.6860.011.46e-4
get 100031.5031.7420.033.96e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.00500.66260.007.44e-5
delete 1000 randomly0.052.03e+410544.94e-51.86e-6
addMany 1000 balanced2.51397.65210.004.80e-5
get 100056.0917.8310.060.00
dfs 1000174.025.7510.170.00
bfs 1000141.067.0910.140.00
morris 100092.3610.8310.090.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342917.161493.43e-45.21e-6
fib add & pop 10003.89256.80140.009.36e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000190.625.2510.190.03
unshift & shift 1000000168.365.9410.170.03
insertBefore 10000.033.37e+418832.97e-56.52e-6
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.85541.77300.003.02e-4
insertBefore 10002.32431.07220.005.25e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001913.830.5211.910.10
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000216.624.6210.220.01
shift 100000027.1136.8830.030.01
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.1423.7320.040.00
push & shift 100000078.6412.7210.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000.492026.341524.94e-46.50e-5
getWords 10000.821221.37698.19e-42.39e-4
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.12471.67250.005.01e-5
delete 1000 randomly0.061.81e+49315.53e-57.08e-7
addMany 10002.87348.35180.003.58e-5
get 100053.7618.6010.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.8914.9530.070.01
delete 100028.0535.6510920.030.04
addMany 10009.09110.0160.014.39e-4
get 100030.5532.7320.030.00
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.03493.66260.003.35e-4
delete 1000 randomly0.052.20e+411164.55e-55.93e-7
addMany 1000 balanced2.65378.00200.009.59e-5
get 100067.9014.7310.070.02
dfs 1000172.245.8110.170.00
bfs 1000141.517.0710.140.00
morris 100095.2710.5010.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342921.081493.42e-43.52e-6
fib add & pop 10003.94253.57140.009.42e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000204.774.8810.200.03
unshift & shift 1000000164.806.0710.160.02
insertBefore 10000.033.53e+419102.83e-55.73e-6
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.77564.06300.004.03e-5
insertBefore 10002.33428.74220.005.85e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001911.530.5211.910.04
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000220.694.5310.220.04
shift 100000025.0239.9630.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.4323.5720.040.01
push & shift 100000080.1612.4810.080.00
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000535.251.8710.540.01
getWords 1000000954.391.0510.950.05
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.12471.05240.001.97e-5
delete 1000 randomly0.061.81e+49245.52e-56.93e-7
addMany 10002.91343.28180.004.22e-5
get 100054.1618.4710.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.4515.0530.070.00
delete 100023.6842.2311050.020.04
addMany 10008.88112.5660.012.72e-4
get 100033.4129.9320.030.01
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.02494.39260.004.57e-5
delete 1000 randomly0.042.23e+411414.49e-57.95e-7
addMany 1000 balanced2.66375.24200.009.32e-5
get 100062.6415.9610.060.00
dfs 1000171.075.8510.170.00
bfs 1000141.617.0610.148.60e-4
morris 100096.0910.4110.100.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342921.531483.42e-43.47e-6
fib add & pop 10003.90256.59140.006.06e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000208.244.8010.210.04
unshift & shift 1000000152.506.5610.150.01
insertBefore 10000.033.66e+419212.73e-51.79e-6
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.75571.08300.003.19e-5
insertBefore 10002.33429.11220.008.52e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001854.150.5411.850.05
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000212.744.7010.210.02
shift 100000025.1139.8230.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.6423.4520.040.01
push & shift 100000078.5012.7410.087.49e-4
trie
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 10000003.17315.82180.003.74e-4
getWords 10000005.00199.99110.011.85e-4
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.19457.50240.006.07e-5
delete 1000 randomly0.061.80e+49245.56e-51.04e-6
addMany 10003.02330.95170.009.53e-5
get 100052.9218.9020.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100065.9415.1730.070.00
delete 100031.5631.6810980.030.04
addMany 10008.94111.8160.013.04e-4
get 100031.5131.7320.032.99e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.45408.29210.002.76e-5
delete 1000 randomly0.052.22e+411324.51e-56.97e-7
addMany 1000 balanced2.74364.65200.008.78e-5
get 100061.5416.2510.060.00
dfs 1000172.435.8010.170.00
bfs 1000140.767.1010.140.00
morris 100093.5710.6910.090.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342933.081493.41e-42.82e-6
fib add & pop 10003.89257.27140.003.17e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000192.825.1910.190.04
unshift & shift 1000000156.376.4010.160.03
insertBefore 10000.033.70e+418962.70e-53.66e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.79559.70300.002.97e-4
insertBefore 10002.32430.90220.006.01e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001874.700.5311.870.04
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000209.654.7710.210.03
shift 100000025.5439.1530.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.4323.5720.040.01
push & shift 100000079.6012.5610.080.00
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.08479.69250.002.14e-5
delete 1000 randomly0.051.82e+49245.49e-54.16e-7
addMany 10002.88347.21180.002.69e-5
get 100052.7218.9710.050.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100065.0515.3730.070.00
delete 100026.2638.0811040.030.04
addMany 10008.81113.4460.019.78e-5
get 100031.4431.8020.033.59e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.04490.04250.002.37e-5
delete 1000 randomly0.042.23e+411374.48e-56.04e-7
addMany 1000 balanced2.67375.13200.002.64e-4
get 100062.2516.0610.060.00
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.342919.711493.43e-44.56e-6
fib add & pop 10003.88257.61140.004.79e-5
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000202.434.9410.200.02
unshift & shift 1000000158.096.3310.160.03
insertBefore 10000.033.75e+419222.67e-54.57e-7
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.77564.48300.007.71e-5
insertBefore 10002.29435.77220.003.74e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001812.540.5511.810.02
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000205.834.8610.210.03
shift 100000024.7840.3530.020.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000042.2923.6520.040.01
push & shift 100000078.3412.7710.080.00
avl-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.39418.91220.006.47e-5
delete 1000 randomly0.061.77e+49175.66e-51.90e-6
addMany 10003.32301.33170.005.90e-4
get 100055.0318.1710.060.00
binary-tree
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 100066.4915.0430.070.00
delete 100024.0441.6011060.020.04
addMany 10009.05110.4460.012.88e-4
get 100032.1231.1320.036.75e-4
bst
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add 1000 randomly2.27440.62230.001.42e-4
delete 1000 randomly0.052.19e+411744.57e-51.97e-6
addMany 1000 balanced2.93341.38190.001.13e-4
get 100062.8515.9110.060.01
heap
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
add & 10000.352878.391493.47e-41.93e-5
fib add & pop 10003.98251.35140.001.32e-4
doubly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
unshift 1000000193.195.1810.190.04
unshift & shift 1000000170.355.8710.170.03
insertBefore 10000.033.43e+418882.91e-56.03e-6
singly-linked-list
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push & pop 10001.79560.08290.007.70e-5
insertBefore 10002.31433.45220.005.52e-5
max-priority-queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
refill & poll 10000001859.400.5411.860.03
deque
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 1000000215.004.6510.220.01
shift 100000025.0439.9430.030.00
queue
test nametime taken (ms)executions per secexecuted timessample mean (secs)sample deviation
push 100000041.8123.9220.040.00
push & shift 100000079.1712.6310.088.70e-4