Java Engineering Programs Blog

Selection sort in java

Selection Sort program in Java

Selection Sort: Selection sort is easy and well known sorting technique.In selection sort unordered list is divided into two parts sorted and unsorted. minimum number from unsorted list is selected and placed in at...

Linear search in java

Linear Search program in Java

class operation { static int Linear_Search(int K[], int n, int KEY) { int i; for(i=1;i<=n;i++) if(KEY == K[i]) return(i); return(-1); } } class searching { public static void main(String args[ ])throws IOException { int...

Merge sort in java

Merge Sort Program in c

Merge Sort: Merge sort is based on the divide and conquer technique. In merge sort unsorted array is divided in half again and again ,until each array contain 1 element. Divided list are merged...

Heap sort in java

Heap Sort Program in c

Heap Sort: #include <stdio.h> #include <conio.h> void makeheap ( int [ ], int ) ; void heapsort ( int [ ], int ) ; void main( ) { int arr[10] = { 11, 2,...