Illustrated data structures introduction

Data structures introduction lists the most common-used data structures. There are arrays, linked lists, stacks, binary trees, hash tables, graphs among others. The definition, illustrations and links to their implementations are included.

Table of Content

  1. Array
  2. Linked list
  3. Tree
  4. Binary tree
  5. Binary search tree
  6. matrix
  7. Graph
  8. Hash table
  9. Stack
  10. Queue
  11. Priority queue
  12. Map-Heap
  13. Min-Heap
  14. Trie
  15. Suffix trie
  16. Illustrated data structured books


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.

data structure array diagram

Array implementation in Java, JavaScript, Python and Doodle
Sorted array implementation in Java, JavaScript, Python and Doodle


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.

data structure linked list diagram

Linked list implementation in Java, JavaScript, Python and Doodle
Doubly linked list implementation in Java, JavaScript, Python and Doodle
Circular linked list implementation in Java, JavaScript, Python and Doodle


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.

data structure tree diagram


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.

data structure binary tree diagram

Binary tree implementation in Java, JavaScript, Python and Doodle


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.

data structure binary search tree diagram

Binary search tree implementation in Java, JavaScript, Python and Doodle
Binary search tree with parent in Java, JavaScript, Python and Doodle


Matrix: A matrix is a double-dimensioned array. It makes use of two indexes rows and columns to store data.

data structure matrix diagram

Matrix implementation in Java, JavaScript, Python and Doodle


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.

data structure graph diagram

Graph implementation (unweighted, adjacency list) in Java, JavaScript, Python and Doodle
Graph implementation (weighted, adjacency list) in Java, JavaScript, Python and Doodle
Graph implementation (unweighted, adjacency matrix) in Java, JavaScript, Python and Doodle


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.

data structure graph diagram

Hash table implementation in Java, JavaScript, Python and Doodle


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.

data structure stack diagram

Stack implementation (array) in Java, JavaScript, Python and Doodle
Stack implementation (linked list) in Java, JavaScript, Python and Doodle


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.

data structure queue diagram

Queue implementation (linked list) in Java, JavaScript, Python and Doodle
Circular Queue implementation (array) in Java, JavaScript, Python and Doodle


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.

data structure priority queue diagram

Priority queue implementation (ordered array) in Java, JavaScript, Python and Doodle
Priority queue implementation (unordered array) in Java, JavaScript, Python and Doodle
Priority queue implementation (heap iterative) in Java, JavaScript, Python and Doodle
Priority queue implementation (heap recursive) in Java, JavaScript, Python and Doodle


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.

data structure max heap diagram

Max heap implementation in Java, JavaScript, Python and Doodle


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.

data structure min heap diagram

Min heap implementation in Java, JavaScript, Python and Doodle


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.

data structure min trie diagram

Trie implementation (array) in Java, JavaScript, Python and Doodle
Trie implementation (linked list) in Java, JavaScript, Python and Doodle
Trie implementation (hashmap) in Java, JavaScript, Python and Doodle


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 structure suffix trie diagram


Data structures illustrated books:

Data structures illustrated java book cover
Data Structures Illustrated Java Book



Data structures illustrated python book cover
Data Structures Illustrated Python Book



Data structures illustrated javascript book cover
Data Structures Illustrated JavaScript Book



Do I have to study data structures and algorithms together?

You can study how data are organized, their basic operations such as insertion, deletion, search and traversal without knowing any algorithms. But as an engineer, you always want to make things efficient and simple. That’s when algorithms come in.

ds feature

Comments are closed