Posts

Showing posts from April, 2020

Summary

Image
Linked List      A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers as shown in the below image: A linked list consists of nodes where each node contains a data field and a reference to the next node in the list. Types of linked list 1.  Single Linked List 2.  Double/Doubly Linked List 3.  Circular Single Linked List 4.  Circular Doubly Linked List Stack and Queue Stack      A stack  is a linear data structure that follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). Stack has two fundamental operations which are push and pop.      A real-life example of a stack is when you stack a plate on top of each other.  The plate which is at the top is the first one to be removed and  the ...