Category: Algorithm

Here you will learn about hill cipher in java with program and algorithm. To start with the program directly is not a good idea here. Until you don’t have a brief understanding of Hill cipher algorithm, their programs will merely a code to copy paste. As per Wikipedia, Hill cipher is a polygraphic substitution cipher based on linear algebra, invented by Lester S. Hill in 1929. Basically Hill cipher is a cryptography algorithm to encrypt and decrypt data to ensure data security. Also Read: Caesar Cipher in

Here you will get java program for shortest job first (sjf) scheduling algorithm, both preemptive and non-preemptive. Shortest job first scheduling algorithm can also be known as shortest job next scheduling. It is very easy to implement and efficient in reducing average response time. Now we will see how it will work with the example and its implementation. In shortest job first, we should know the execution time of each process before running. This we can estimate in many ways.

In this article we are going to learn about first come first serve (fcfs) scheduling in Java with program example. FCFS strategy will be helpful in many situations especially in tie breaking situations. Here we will see FCFS strategy with scheduling problem. First Come First Serve (FCFS) Scheduling First come First serve means whatever the job came first we should process that job first regardless other properties. This situation we can map with our real time scenario. When we are

Here you will learn about quick sort in Java with program example. As name suggested it is one of the fastest algorithms with average time complexity O(nlogn). It is also using divide and conquer strategy to sort as like merge sort. It has taken all advantages of merge sort and it has overcome the disadvantage of using auxiliary space also. It is popular because it is faster and also space efficient. But in worst case it is O(n^2) then also

In this tutorial you will learn about merge sort in Java with program and example. Merge sort has gained its popularity because of its runtime and simplicity. It will exhibit best runtime for sorting. Now we will see algorithm, program with example for merge sort. It uses divide-and-conquer policy to sort input elements. Divide phase: It will divide problem into smaller sub problems of same kind. Conquer phase: In this phase we will solve each sub problem. Combine phase: In

In this tutorial you will learn about insertion sort in Java with example and program. Insertion Sort Principle The strategy behind this sorting is much similar to playing cards. In cards playing we used to see that player will hold the cards in sorted manner. Whenever he wants to insert a new card he will put that in such way that again the cards in hand should be in sorted manner only. The below image can illustrate the phenomenon. When

In this tutorial you will learn about selection sort in Java with example. It will sort the input elements in ascending or descending order by taking small or large element among the input elements and swap that element with the element in 1st position. Then it picks second small or large element and swap it with the element in second position. Likewise it will sort all the elements in the input in n-1 passes if our input size is n.

Here you will get program for vigenere cipher in Java for both encryption and decryption. Vigenere Cipher is a polyalphabetic substitution technique that is used for encrypting and decrypting a message text. In this technique we use a table of alphabets A to Z which are written in 26 rows which is also known as Vigenere Table. Also Read: Caesar Cipher in Java (Encryption and Decryption) Also Read: Hill Cipher in Java [Encryption and Decryption] Encryption Lets understand encryption by one example. Plain