The common data structures include arrays, linked lists, stacks, queues, trees, hash tables and graphs. Different types of data structures are suited to different kinds of applications.
Table of Content
- Array
- Linked list
- Tree
- Binary tree
- Binary search tree
- matrix
- Graph
- Hash table
- Stack
- Queue
- Priority queue
- Map-Heap
- Min-Heap
- Trie
- Suffix trie
- Data structured illustration PDF and EPUB
Array: An array is an index-based data structure, which means every element is referred by an index. An array holds same data type elements.
Linked list: A linked list is a sequence of nodes in which each node is connected to the node following it. This forms a chain-link of data storage. It consists of data elements and a reference to the next record.
Tree: A tree is a collection of nodes connected by edges. Each node points to a number of nodes. A tree represents the hierarchical graphic form.
Binary tree: A binary tree has 1 or 2 nodes. It can have a minimum of zero nodes, which occurs when the nodes have NULL values.
Binary search tree: A binary search tree (BST) is a binary tree. The left subtree contains nodes whose keys are less than the node’s key value, while the right subtree contains nodes whose keys are greater than or equal to the node’s key value. Moreover, both subtrees are also binary search trees. A binary search tree can retrieve data efficiently.
Matrix: A matrix is a double-dimensioned array. It makes use of two indexes rows and columns to store data.
Graph: A graph contains a set of nodes and edges. The nodes are also called vertices. Edges are used to connect nodes. Nodes are used to store and retrieve data.
Hash table: Hash table is a data structure that can map keys to values. A hash table uses a hash function to compute a key into an integer (hash value), which indicates the index of the buckets (aka array). From the key, the correct value can be stored and found. Hash table is one of the most used data structures.
Stack: a stack is LIFO data structure in which only the top element can be accessed. The data is added by push and removed by pop on top.
Queue: A queue is FIFO data structure. In this structure, new elements are inserted at one end and existing elements are removed from the other end.
Priority queue: Priority queue is a queue, with each element having a priority associated with it. The implementation can use ordered array, unordered array, and heap.
Max-Heap: A heap is a tree-based data structure in which all the nodes of the tree are in a specific order. Max-heap is a binary tree. It is complete. The data item stored in each node is greater than or equal to the data items stored in its children.
Min-Heap: Min-heap is a binary tree. It is complete. The data stored in each node is less than the data items stored in its children.
Trie: A Trie is a tree. In a trie, every node (except the root node) stores one character or a digit. By traversing the trie down from the root node to a particular node n, a common prefix of characters or digits can be formed which is shared by other branches of the trie as well.
Suffix trie: Suffix trie is a trie containing all the suffixes of the given text. Suffix trie allows particularly fast implementations of many important string operations.
Data structures PDF and EPUB: