Priority Queue

‘The blog is my first priority of all!’ It might be true and might not be but what we are concerned about here is the word priority. It is simple in English and in any language meaning putting them first ahead of all. In order to do that we should be aware that why we […]

Heapsort

From our earlier posts, we are aware of what a heap is and how basic operations are performed on a heap. One of the basic operations is deletion. Have we ever given a thought to utilizing the deletion operation to execute some other operation? To be honest, even I didn’t know it for some time. […]

Heap Data structure

Have you heard of ‘heap of grass’? How is it arranged? The bottom will be of larger width compared to the top, of course, the science. We can relate that to our topic, Heap data structure. We have learned about binary trees and their representation in an array and a Linked List. This heap data […]

Doubly Linked List

If I am not wrong, we had an introduction and implementation of Linked List in the earlier posts! If you have not gone through it yet, the links are provided in the section, “Reference and Recommendations”. So, taking the discussion of linked lists a little ahead we will now raise a question.  Can there be […]

Array & Linked List

From basic English, we are aware of the difference between linear and non-linear. In simple terms, linear means straight, and non-linear mean the opposite i.e. not straight. Similarly, data structures are divided into linear and non-linear. Linear Data Structure: The data elements are arranged in a linear order where each and every element is attached […]

Representation of Binary Tree (Array)

In the earlier posts, we have learned about trees and some its types. If not remembering, check it out! Theoretically, it is fine. But how will we represent them and make sense while actually coding them? Let’s clear our way. Representation of Binary Trees using Arrays: From the above figure, we can conclude that it […]

Tree Data Structure

I am pretty sure that we all have seen trees, at least in cartoons! Let us fill a questionnaire regarding the details of a tree. Which is the most vital part of a tree? Or the other way, where does a tree start growing? Root, obviously.What does a tree have connecting to the roots, directly […]

Queue in Data Structures

I hope we all have been in a line to pick our order at the cafe or restaurant. Technically, that line is a queue. Who will be served first? The one first in the queue or the later one? Well yes, the first one of course! What do you observe in a queue? First come […]

0/1 Knapsack Problem

We have seen the problem of a thief in the earlier posts, Fractional Knapsack problem. If you haven’t, check it out now. From the fractional Knapsack problem, we are aware that things can be partitioned and taken according to the profit. But from the heading itself one can understand that in the 0/1 Knapsack problem, […]

Dynamic Programming

“Dude! Can you count this money?” Assuming the money given consists completely of 100 rupee notes, let’s say it summed up to 1900. Now, I have given you a one hundred rupee note. How much is it now, in total? 2000? Did you count all the money again or just added one hundred to the […]

Backtracking

How many of you wanted to be seated at the corners of your bench or table during school? Well, I preferred it. Why so? It would be easy for me to rush out of the class when the final bell rang. Those days were awesome. Why are we supposed to remember those golden days here? […]

Leaky Bucket- Traffic Shaping Algorithm

We will do time travel now!!! It has something to do with our discussion and we can relate. Remember the “baby bottle” which everyone used during their childhood? Why a simple bottle or glass is not used to feed milk? The flow of milk is the cause! When a large (comparatively) sized mouth is used, […]