Different data structures and algorithms provide varying inherent performance characteristics which will result in a downstream performance outcome on the systems which use them.
Selection of the best possible data structures and sorting algorithms, will aid fast application performance, by avoiding slow alternatives.
Data Structures
Legend
Type | Seek (average) |
Search (average) |
Insert (average) |
Delete (average) |
Seek (worst) |
Search (worst) |
Insert (worst) |
Delete (worst) |
Space Complexity (worst) |
---|---|---|---|---|---|---|---|---|---|
Array | |||||||||
Stack | |||||||||
Queue | |||||||||
Singly Linked List | |||||||||
Doubly Linked List | |||||||||
Skip List | |||||||||
Hash Table | |||||||||
Binary Search Tree | |||||||||
Cartesian Tree | |||||||||
B-Tree | |||||||||
Red-Black Tree | |||||||||
Splay Tree | |||||||||
AVL Tree | |||||||||
KD Tree |
Array Sorting
Legend
Type | Time (best) |
Time (average) |
Time (worst) |
Space Complexity worst |
---|---|---|---|---|
Quicksort | ||||
Merge sort | ||||
Timsort | ||||
Heapsort | ||||
Bubble Sort | ||||
Insertion Sort | ||||
Selection Sort | ||||
Tree Sort | ||||
Shell Sort | ||||
Bucket Sort | ||||
Radix Sort | ||||
Counting Sort | ||||
Cubesort |