What are the different types of data structures and what are the advantages and disadvantages of each one ?
So as introduction who know what is data structure ?
In Computer Sciences a Data Structure is a data organization and storage format that enables access and modification . There are many data structures, and even the ones that are covered here have many nuances that make it impossible to cover every possible detail. But my hope is that this will give you an interest to research them further .
So First Of All we have the stack which is a linear data structure in which elements can be inserted and deleted only from one side of the list , then we have the queue which is a linear data structure in which elements can be inserted only from one side of the list , and the elements can be deleted only from the other side , also we have the linked list which is a linear collection of data elements whose order is not given by their physical placement in memory , we can’t forget to notice the array which is consisting of a collection of elements (values and variables), each identified by at least one array index or key ,and finally we have the tree if we compare it to the arrays , linked lists, stacks and queues which are linear data structures. A tree can be empty with no nodes or a tree is a structure consisting of one node .
So as a conclusion what i want to say is that in our world we have so many real examples for data structures like the line of people waiting to get through a checkpoint , the dishes in restaurant .