Queue Data Structure: How To start using in 10 Minutes
A queue is an important data structure that works on the principle of FIFO. FIFO stands for First In First Out. This means that the first elements…..
A queue is an important data structure that works on the principle of FIFO. FIFO stands for First In First Out. This means that the first elements…..
A stack is a linear data structure that works on the principle of LIFO. LIFO stands for Last In First Out. This means that the last elements which is going to get inserted is going to be the first element to get removed. We can imagine a stack as a pile of cloths or a … Read more
When we have a singly linked list, the task is to update the linked list by adding a new node in the middle of the linked list. If the size of the linked list, size is even, then the new node is to be added at (size/2) position or else if the length is odd … Read more
When we have a linked list, we want to add a node in the end of a linked list. Let us first try to figure out the intuition behind the algorithm. We start by iterating the list so that we get to the last node of the linked list. Next, we add the new node … Read more