Category Archives: Sorting Programs

Write a C Program to Implement Pigeonhole Sort

Write a C Program to Implement Pigeonhole Sort   This C Program implement pigeonhole sort. Pigeonhole sorting, also known as count sort, is a sorting algorithm that is suitable for sorting lists of elements where the number of elements (n) and the number of possible key values (N) are approximately the same.[1] It requires O(n… Read More »

Write a C Program to Sort an Array using Gnome Sort

Write a C Program to Sort an Array using Gnome Sort This C Program sort the array elements using gnome sort. Gnome sort(stupid sort) is a sorting algorithm which is similar to insertion sort, except that moving an element to its proper place is accomplished by a series of swaps, as in bubble sort. It… Read More »

Write a C Program to Sort an Array using Heap Sort

Write a C Program to Sort an Array using Heap Sort   This C Program sorts an array based on heap sort algorithm. Here is source code of the C Program to sort an array based on heap sort algorithm. The C program is successfully compiled and run on a Windows system. The program output is… Read More »

Write a C Program to Sort Array using LSDRadix Sort

Write a C Program to Sort Array using LSDRadix Sort      This C Program sorts an integer array using lsdradix sort algorithm. Here is source code of the C Program to sort an integer array using lsdradix sort algorithm. The C program is successfully compiled and run on a Windows system. The program output is… Read More »

Write a C Program to Implement Postman Sort Algorithm

Write a C Program to Implement Postman Sort Algorithm   This C Program implements Postman Sort Algorithm. Here is source code of the C Program implements Postman Sort Algorithm. The C program is successfully compiled and run on a Windows system. The program output is also shown below. Also Read : : Write a C Program… Read More »

Write a C Program to Sort strings in alphabetical order

Write a C Program to Sort strings in alphabetical order   Problem Statement : Write a C Program that will accept set of 5 strings and sort them using strcmp library function and print the result on the screen.     Also Read : : Sort Structures on basis of Structure Element in C  … Read More »

Sort Structures on basis of Structure Element in C

Write a C Program to Sort Structures on basis of Structure Element   Sorting Two Structures on the basis of any structure element and Display Information Program Statement – Define a structure called cricket that will describe the following information Player name Team name Batting average Using cricket, declare an array player with 10 elements and… Read More »

Write a C Program to Perform Quick Sort using Recursion

Write a C Program to Perform Quick Sort using Recursion   The following C program, using recursion, performs quick sort. A quick sort is a sorting algorithm with complexity of O(nlogn). It is used for sorting numbers, structure, files. Here is the source code of the C program to display a linked list in reverse.… Read More »

Write a C Program to Perform Merge Sort using Recursion

Write a C Program to Perform Merge Sort using Recursion   The following C program, using recursion, performs merge sort. A merge sort is a sorting algorithm with complexity of O(nlogn). It is used for sorting numbers, structure, files. Here is the source code of the C program to display a linked list in reverse.… Read More »