## Program to Sort a given set of elements using Selection sort

#include #include #include   void main()   { int i,n,j,min,k,a[20],ch=1;    clock_t begin,end;    clrscr(); while(ch)    { printf("n enter the number of elementsn");       scanf("%d",&n);       printf("n…

## Program to Sort a given set of elements using Merge sort

//Sort a given set of elements using Merge sort method and determine the time taken to sort the elements #include #include #include #define max 20 void mergesort(int a[],int low,int high);…

## Program to Compute the transitive closure of a given directed graph using Warshall’s algorithm

//Compute the transitive closure of a given directed graph using Warshall's algorithm #include #include int a[10][10]; void main() { int i,j,k,n; clrscr(); printf("n enter the number of verticesn"); scanf("%d",&n); printf("n…

## Program to find the Binomial Co-efficient using Dynamic Programming

#include #include void main() { int i,j,k,n,c[50][50]; clrscr(); printf("n enter the value of n &kn"); scanf("%d%d",&n,&k); for(i=0;i

## Program to Implement Horspool algorithm for String Matching

#include #include void main() { int table[126]; char t[100],p[25]; int n,i,k,j,m,flag=0; clrscr(); printf("Enter the Textn"); gets(t); n=strlen(t); printf("Enter the Patternn"); gets(p); m=strlen(p); for(i=0;i

## Program to Implement Recursive Binary search and Linear search

/* Implementation of recursive binary search and sequential search */ #include #include #include #include                       #define max 20 int pos; int binsearch(int,int[],int,int,int); int linsearch(int,int[],int); void main() { int ch=1; double t;…

Objective:C++ program for stack ADT using linked list implementation.Concept: A stack data structure can be implemented by using linked list data structure. The stack implemented using linked list can work for…

## C++ program for stack using array implementation

Objective: C++ program to implement stack using arrayConcept: A stack data structure can be implemented using one dimensional array. But stack implemented using array, can store only fixed number of data values.…

## Sort a given set of elements using Insertion sort

Objective: C program to sort the elements using insertion sort methodConcept: This uses decrease and conqueror method to sort a list of elements. This sorting technique is very efficient if the elements…

## Program to Sort a given set of elements using Selection sort

Objective: C program to sort the elements using selection sort methodConcept: This uses the brute force method for sorting. In this method, obtain the first smallest number and exchange that with the…