Data Structures are a specialized means of organizing and storing data in computers in such a way that we can perform operations on the stored data more efficiently.
Let’s take a quick look at eight commonly used data structures that every programmer should be familiar with.
An array is a structure of fixed size, which can hold items of the same data type. It can be an array of integers, an array of floating-point numbers, an array of strings, or even an array of arrays (such as 2-dimensional arrays).
2. Linked Lists
A linked list is a sequential structure that consists of a sequence of items in linear order which are linked to each other.
A stack is a LIFO (Last In First Out – the element placed at last can be accessed at first) structure which can be commonly found in many programming languages. This structure is named as “stack” because it resembles a real-world stack – a stack of plates.
A queue is a FIFO (First In First Out – the element – placed at first can be accessed at first) structure which can be commonly found in many programming languages.
5. Hash Tables
A Hash Table is a data structure that stores values which have keys associated with each of them. Furthermore, it supports lookup efficiently if we know the key associated with the value.
A tree is a hierarchical structure where data is organized hierarchically and are linked together. This structure is different from a linked list whereas, in a linked list, items are linked in a linear order.
Read this Post: A Complete Guide To Become A Perfect Full-Stack Web Developer.
A Heap is a special case of a binary tree where the parent nodes are compared to their children with their values and are arranged accordingly.
A graph consists of a finite set of vertices or nodes and a set of edges connecting these vertices. The order of a graph is the number of vertices in the graph. The size of a graph is the number of edges in the graph.
Are you Preparing For Interviews, then this book will help you: Data Structures And Algorithms Made Easy: Data Structures And Algorithmic Puzzles