Data Structure advantages and disadvantages

¡Supera tus tareas y exámenes ahora con Quizwiz!

Graph

Advantages: Fast insertion and unordered traversal of nodes and edges. Disadvantages: Complex. Slow search (by label) and deletion. Traversal can be slow depending on path and constraints. Can take more space than other data structures.

Hash table

Advantages: Fast search. Fast Insertion and quick deletion in most cases. Disadvantages: Complex. Can take more space than other data structures. Traversal may be slightly slower than others.

Queue

Advantages: Moderately complex. Fast for first-in first-out (FIFO) insertion and deletion. Fast traversal. Disadvantages: Slow search for items other than FIFO.

Linked list

Advantages: Moderately complex. Fast insertion and deletion for known position in list. Easy to grow and shrink. Fast traversal. Disadvantages: Slow search.

Heap

Advantages: Moderately complex. Quick insertion and quick deletion of items in sorted order. Fast traversal. Disadvantages: Slow search for items other than minimum or maximum.

Binary tree

Advantages: Moderately complex. Quick search, insertion and deletion when tree is balanced. Easy to grow and shrink. Fast traversal. Disadvantages: Deletion algorithm is complex and balancing can be time-consuming.

Quadtree

Advantages: Quick search, insertion and deletion by 2 dimensional coordinates. Easy to grow and shrink. Fast traversal. Disadvantages: Complex

Red-black tree

Advantages: Quick search, insertion and deletion. Tree always balanced. Fast traversal. Disadvantages: Complex

2-3-4 tree

Advantages: Quick search, insertion and deletion. Tree always balanced. Similar trees are good for disk storage. Easy to grow and shrink. Fast traversal. Disadvantaes: Complex

Ordered array

Advantages: Same as array but quicker search for items if looking by sort key. Disadvantages: Same as array

Stack

Advantages: Simple. Fast for last-in, first-out (LIFO) insertion and deletion. Fast traversal. Disadvantages: Slow search for items other than LIFO.

Array

Advantages: Simple. Fast insertion as long as index is known. Fast traversal. Disadvantages: Slow search, size must be known at beginning. Slow to grow.


Conjuntos de estudio relacionados

Crash Course: Slavery #13 (Quiz)

View Set

Personal Finance F260 Exam II Practice

View Set

Ch. 35 Assessment of Immune Function

View Set

Human Resource Management or HRM

View Set

Sustantivos femeninos con terminación "-cion"/"-sion"/"-dad"/"-tad"/"-tud"

View Set

Nurs 211 Chapter 17: Implementing

View Set