Category Archives: Algorithm

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 »

Hamming Code in C and C++

Here you will get program for hamming code in C and C++. Hamming code is a popular error detection and error correction method in data communication. Hamming code can only detect 2 bit error and correct a single bit error which means it is unable to correct burst errors if may occur while transmission of… Read More »

Hill Cipher in C and C++ (Encryption and Decryption)

Here you get encryption and decryption program for hill cipher in C and C++. What is Hill Cipher? In cryptography (field related to encryption-decryption) hill cipher is a polygraphic cipher based on linear algebra. Invented by Lester S. Hill in 1929 and thus got it’s name. It was the first cipher that was able to… Read More »

Bucket Sort in C and C++

Here you will get program for bucket sort in C and C++. In bucket sort algorithm the array elements are distributed into a number of buckets. Then each bucket sorted individually either using any other sorting algorithm or by recursively applying bucket sort. Take example shown in below image. Elements are distributed among buckets Then,… Read More »

Checksum Program in C and C++

Here you will get checksum program in C and C++. A checksum is a error detection method in Data Communication. It is used for errors which may have been introduced during transmission or storage. It is usually applied to an installation file after it is received from the download server. The actual procedure which yields… Read More »

First Fit Algorithm in C and C++

Here you will learn about first fit algorithm in C and C++ with program examples. There are various memory management schemes in operating system like first fit, best fit and worst fit. In this section we will talk about first fit scheme. What is First Fit Memory Management Scheme? In this scheme we check the… Read More »

Best Fit Algorithm in C and C++

Here you will learn about best fit algorithm in C and C++ with program example. Memory Management is one of the services provided by OS which is needed for Optimized memory usage of the available memory in a Computer System. For this purpose OS uses 3 methods:- First Fit Best Fit Worst Fit In this… Read More »

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 »