disadvantages and advantages of common data structures
advantages of unordered arrays
- quick insertion - very fast access if the index is known
stable sorting
A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in sorted output as they appear in the input array to be sorted
2-3-4 tree disadvantages
complex
red-black tree disadvantages
complex
disadvantages of binary tree
deletion algorithm is complex
heap advantages
fast insertion, deletion and access to largest item - models real-world situations
binary trees combine the benefits of which two data structures
linked-lists and ordered-arrays - we can search, insert, and delete quickly
graph advantages
models real-word situations
advantages of queues
provides FIFO
advantages of stacks
provides LIFO
advantages of linked lists
quick insertion and deletion
advantages of binary tree
quick search, insertion, and deletion (if tree remains balanced)
2-3-4 tree advantages
quick search, insertion. and deletion - the tree is always balanced
red-black tree advantages
quick search, insertion. and deletion - the tree is always balanced
advantages of ordered arrays
quicker search than unsorted array
disadvantage of stacks
slow access to other items
disadvantages of queues
slow access to other items
heap disadvantages
slow access to other items
hash table disadvantages
slow deletion - access slow if key not known - inefficient memory usage
disadvantage of ordered arrays
slow deletion and insertion - fixed size
disadvantages of unordered arrays
slow insertion and deletion - fixed size
disadvantages of linked lists
slow search
graph disadvantages
some algorithms are slow and complex
hash table advantages
very fast access key known - fast insertion