Category Archives: Algorithm

Caesar Cipher in C and C++ [Encryption & Decryption]

Get program for caesar cipher in C and C++ for encryption and decryption. What is Caesar Cipher? It is one of the simplest encryption technique in which each character in plain text is replaced by a character some fixed number of positions down to it. For example, if key is 3 then we have to replace… Read More »

Optimal Page Replacement Algorithm in C

Here you will get program for optimal page replacement algorithm in C. Optimal page replacement algorithm says that if page fault occurs then that page should be removed that will not be used for maximum time in future. It is also known as clairvoyant replacement algorithm or Bélády’s optimal page replacement policy. Also Read: LRU Page Replacement Algorithm… Read More »

LRU Page Replacement Algorithm in C

Here you will get program for lru page replacement algorithm in C. Least Recently Used (LRU) page replacement algorithm works on the concept that the pages that are heavily used in previous instructions are likely to be used heavily in next instructions. And the page that are used very less are likely to be used… Read More »

Producer Consumer Problem in C

Here you will learn about producer consumer problem in C. Producer consumer problem is also known as bounded buffer problem. In this problem we have two processes, producer and consumer, who share a fixed size buffer. Producer work is to produce data or items and put in buffer. Consumer work is to remove data from… Read More »

Banker’s Algorithm in C

Here you will get program for banker’s algorithm in C. The banker’s algorithm  which is also known as avoidance algorithm is a deadlock detection algorithm. It was developed by Edsger Dijkstra. It is designed to check the safe state whenever a resource is requested. It takes analogy of bank, where customer request to withdraw cash.… Read More »

Round Robin Scheduling Program in C

In this tutorial you will learn about round robin scheduling program in C. Process scheduling is an important component for process management. In a multi-user and a time-sharing system, response time is one of the most important objective to be accomplished. There are many scheduling algorithms in C for process management such as: 1. First Come First… Read More »

Counting Sort in C

Here you will learn about counting sort in C   Counting sort algorithm is a sorting algorithm which do not involve comparison between elements of an array. In this tutorial I am sharing counting sort program in C. Steps that I am doing to sort the elements are given below. 1. First of all I… Read More »

N Queens Problem in C Using Backtracking

Here you will get program for N queens problem in C using backtracking. N Queens Problem is a famous puzzle in which n-queens are to be placed on a nxn chess board such that no two queens are in the same row, column or diagonal. In this tutorial I am sharing the C program to… Read More »

Insertion Sort in C & C++ – Program & Algorithm

In this tutorial I will explain about algorithm for insertion sort in C and C++ using program example. The insertion sort inserts each element in proper place. The strategy behind the insertion sort is similar to the process of sorting a pack of cards. You can take a card, move it to its location in sequence and move… Read More »