Priority Queue (heap)

Most of people would say, Heap data structures is learnt mainly for heapsort.  They ignore an important point about Heap and it’s enormous set of practical applications.  Let’s take a look at following scenario. We book an OLA cab at 7:00 PM using Mobile Application for Airport Drop @ 4:00 AM next morning. OLA informs that…

Debugging

Debugging Literal meaning of debugging is to ‘Remove Errors’.  In terms of Computer Programs it means finding problems (BUGS) in a computer program which is producing the wrong output for a given input. In order to find an issue, programmers use a technique called Tracing. Tracing Monitoring the execution of a program step-by-step to see…

Loops

Loops In C There are following loops in C while for do… while each of the loop involves three key steps called – initialization, condition and updation. While Loop   initialization; while(condition){      updation; } For Loop for(initialization;condition;updation) { } Do While Loop do { }while(condition); Exercises 11332 – Summing Digits Hacker Rank –…

Input and Output Functions

In any programming language it is important to first master the input and output functions so that we can write the programs that can work based on user given input. Input Output Functions in C Functions in C that are responsible for performing input and output are scanf and printf respectively. Header File #include <stdio.h>…