C Program to Implement Odd Even Sort

This C Program implement oddeven sort. Here is source code of the C Program to implement oddeven sort. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C Program to Implement Oddeven Sort  */#include <stdio.h>#define MAX 7 void swap(int *,int *);void oddeven_sort(int *); void main(){ int … Read more

advertisement

C Program to Implement Cyclesort

This C Program implements cyclesort. Cycle sort is an in-place, unstable sorting algorithm, a comparison sort that is theoretically optimal in terms of the total number of writes to the original array, unlike any other in-place sorting algorithm. It is based on the idea that the permutation to be sorted can be factored into cycles, … Read more

advertisement

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 + N) time Here is source code of the … Read more

advertisement

C Program to Implement Qsort using Function Pointers

This C Program implements qsort using function pointers. Here is source code of the C Program implements qsort using function pointers. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /*  * C Program to Implement qsort using function pointers */#include <stdio.h>#include <stdio.h>#include <stdlib.h>#include <string.h> struct s{ … Read more

advertisement

C Program to Sort the Array Elements 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 is conceptually simple, requiring no nested loops. Here is source code … Read more

advertisement

Heap Sort Program in C

Heap Sort in C is a comparison-based efficient sorting algorithm. It is based on a Binary Heap data structure. To understand the heap sort, we first need to know some basic terminologies related to the heap sort. Binary Tree In a Binary tree data structure, every element contains at most two children. Given diagram shows … Read more

advertisement

C Program to Sort an Integer Array using LSDRadix Sort Algorithm

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 Linux system. The program output is also shown below. /*  * C Program to Sort an Integer … Read more

advertisement

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 Linux system. The program output is also shown below. /*  * C Program to Implement Postman Sort Algorithm */#include <stdio.h> void arrange(int,int);int array[100], array1[100];int i, j, temp, max, … Read more

advertisement

C Program to Implement Insertion Sort

What is Insertion Sort? Insertion Sort is basically the insertion of an element from a random set of numbers, to its correct position where it should actually be, by shifting the other elements if required. Problem Description Create a C program to perform an insertion sort and further analyze its efficiency. Expected Input and Output … Read more

advertisement

C Program to Implement Depth First Search Traversal using Post Order

This C Program implements depth first search traversal using post order. Here is source code of the C Program to implement depth first search traversal using post order. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C Program to Implement Depth First Search … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.