In previous chapter we have seen how to implement queue using arrays. In this chapter we shall see how to implement queue using linked list . One major implementation difference here is that, instead of taking taking 2 pointers like “rear” and “front”, using LL we …
What is a Queue? A queue is a data structure where the elements are inserted from one end and are deleted from the other end. The place where the elements are inserted is called as rear end, and the place where the elements are deleted is …
In the first chapter of Linked List we learnt about Singly Linked List. In this chapter we shall learn about circular singly linked list. The only addition is, the last node next pointer will point to the head node, hence making it circular Linked List. Below …
In the previous chapter we learnt about single linked list. In this chapter we shall learn about Doubly Linked List. Doubly Linked List is a special data structure, which is a collection of zero or more nodes. Each node is made up of 3 parts, “prev_link …
Singly Linked list is a special data structure, which is a collection of zero or more nodes. The node is a combination of data + link. Data: It is used to store some value. It can be an Integer variable or a structure. Link: It is …
In the previous chapter we have seen introduction to stack and it’s implementation using Arrays. In this chapter we shall see how to implement stack using Linked List. As till now we have not used LL, below are some Linked List Basics: In the next chapters …
Jump search is an improvement over linear search. In linear search, we check the element one by one till we find the key element, or till we reach the end of the array. But what if we can find the key element way faster than linear …
Binary search is a simple search technique that works on sorted array, either it can be ascending or descending. Below are the steps to perform binary search: Binary search can be similar to searching a word in a dictionary. We open the book in the middle …