Category Archives: Algorithm

Bellman-Ford Algorithm in C and C++

Here you will learn about Bellman-Ford Algorithm in C and C++. Dijkstra and Bellman-Ford Algorithms used to find out single source shortest paths. i.e. there is a source node, from that node we have to find shortest distance to every other node. Dijkstra algorithm fails when graph has negative weight cycle. But Bellman-Ford Algorithm won’t fail… Read More »

Matrix Chain Multiplication in C and C++

Here you will learn about Matrix Chain Multiplication with example and also get a program that implements matrix chain multiplication in C and C++. Before going to main problem first remember some basis. We know that, to multiply two matrices it is condition that, number of columns in first matrix should be equal to number of… Read More »

Travelling Salesman Problem in C and C++

Here you will learn about Travelling Salesman Problem (TSP) with example and also get a program that implements Travelling Salesman Problem in C and C++. Let say there are some villages (1, 2, 3, 4, 5). To work with worst case let assume each villages connected with every other villages. And there is a Salesman living… Read More »

Analysis of Algorithms

In this tutorial you will learn about analysis of algorithms. Before learning analysis of algorithms lets quickly take a look on what is an algorithm and why we require it. What is an Algorithm? An algorithm is the step by step unambiguous procedure to solve a given problem. For example steps for making Tea or… Read More »

Sliding Window Protocol Program in C and C++

Here you will get sliding window protocol program in C. In computer networks sliding window protocol is a method to transmit data on a network. Sliding window protocol is applied on the Data Link Layer of OSI model. At data link layer data is in the form of frames. In Networking, Window simply means a… Read More »

Bisection Method in C and C++

In this tutorial you will get program for bisection method in C and C++. To find a root very accurately Bisection Method is used in Mathematics. Bisection method algorithm is very easy to program and it always converges which means it always finds root. Bisection Method repeatedly bisects an interval and then selects a subinterval… Read More »

RSA Algorithm in C and C++ (Encryption and Decryption)

Here you will learn about RSA algorithm in C and C++. RSA Algorithm is used to encrypt and decrypt data in modern computer systems and other electronic devices. RSA algorithm is an asymmetric cryptographic algorithm as it creates 2 different keys for the purpose of encryption and decryption. It is public key cryptography as one… Read More »

Difference between Preemptive and Non-Preemptive Scheduling in OS

Here you will learn about difference between preemptive and non-preemptive scheduling in os. Preemptive Scheduling Preemptive Scheduling means once a process started its execution, the currently running process can be paused for a short period of time to handle some other process of higher priority, it means we can preempt the control of CPU from… Read More »