<aside> ℹ️ Sources :

</aside>

There are several types of data structures, each with its own strengths and weaknesses. Here are a few of the most common:

  1. Arrays: An array is a simple data structure that holds a fixed number of items of the same type. Arrays are useful when you know the exact number of elements you'll be dealing with, and you need quick access to them.
  2. Linked Lists: A linked list is a linear data structure where each element is a separate object. Each element (that is, node) of a list is made up of two items: the data and a reference to the next node. The last node has a reference to null.
  3. Stacks: A stack is a linear data structure that follows the Last In First Out (LIFO) principle. The insertion and removal of elements happens at one end, known as the 'top' of the stack.
  4. Queues: A queue is a linear data structure that follows the First In First Out (FIFO) principle. Insertion happens at the rear and removal occurs at the front.
  5. Trees: A tree is a nonlinear data structure that simulates a hierarchical structure. Each piece of data in the tree is contained in a node, and each node has links to other nodes.
  6. Graphs: A graph is a nonlinear data structure that contains nodes and edges. The nodes are sometimes also referred to as vertices and the edges are lines or arcs that connect any two nodes in the graph.
  7. Hash Tables: A hash table, also known as a hash map, is a data structure that implements an associative array abstract data type. It uses a hash function to compute an index into an array of buckets or slots.
  8. Heaps: A Heap is a special Tree-based data structure in which the tree is a complete binary tree. It follows the property that each node is either greater than or equal to (in a max heap) or less than or equal to (in a min heap) its child nodes.