Data structures

A data structure is a format for organizing, managing, and storing data so that it can be efficiently accessed or modified.

Examples of data structures include:

  • Array
  • Queue
  • Stack
  • Dictionary
  • Linked list
  • Graph
  • Tree
  • Binary tree


An array stores values of the same type at contiguous memory locations, allowing the indexing of individual elements.


A queue is a first in first out (FIFO) data structure.


  • enqueue
  • dequeue


A stack is a last in first out (LIFO) data structure.


  • push
  • pop

Linked list

A linked list is a dynamic data structure comprised of nodes pointing to other nodes.


A dictionary is a set of associated key/value pairs.


A graph represents data as nodes and edges.


A tree represents data as parent nodes linked to child nodes by edges.

Binary tree

A binary tree is a tree structure that adheres to the following properties:

  • The value of the left sub-tree is less than the value of its parent node
  • The value of the right sub-tree is greater than or equal to the value of its parent node