Important Data Structures

Data structures organise and store computer data for easy access and modification.
Different data structures fit different applications, and some are highly specialised to certain requirements.

An array is a collection of items stored at contiguous memory locations. The items can be of the same type or of different types. Arrays are used to store multiple items in a single variable

Arrays

A linked list is a linear data structure in which elements are stored in nodes, and each node has a reference to the next node in the list. 

Linked List

A stack is a linear data structure that follows the last-in, first-out (LIFO) principle. Stacks are often used to store data temporarily as part of a function call or to reverse the order of items

Stack

A queue is a linear data structure that follows the first-in, first-out (FIFO) principle. In other words, the first element added to the queue is the first one to be removed. Queues are often used to store data that needs to be processed in a first-come, first-served manner.

Queue

A tree is a hierarchical data structure consisting of nodes. Each node in a tree has one or more child nodes, and the top node is called the root. Trees store data in a hierarchical manner, and they are often used to represent the structure of a file system

Trees

A graph is a data structure that consists of a finite set of vertices (or nodes) and a set of edges connecting these vertices. Graphs are used to represent relationships between data, and they are often used to model networks

Graphs

A hash table is a data structure that is used to store keys and values. It uses a hash function to map the keys to specific indices in an array, and it is used to implement maps and sets.

Hash Table