C Program to Implement Comb Sort Algorithm

This C Program performs Comb sort on array of integers. Comb sort is a comparison sorting algorithm. It is an exchange sort, similar to bubble sort. Here is source code of the C Program to perform Comb sort on array of integers. The C program is successfully compiled and run on a Linux system. The … Read more

advertisement

C Program to Sort the String and Remove Repeated Characters

This C Program sorts the string(ignore spaces) and repeated characters should be present only once. Here is source code of the C Program to sort the string(ignore spaces) and repeated characters should be present only once. The C program is successfully compiled and run on a Linux system. The program output is also shown below. … Read more

advertisement

C Program to Implement CockTail Sort

This C Program implements cocktail sort. Cocktail sort is a variation of bubble sort that is both a stable sorting algorithm and a comparison sort. The algorithm differs from a bubble sort in that it sorts in both directions on each pass through the list. This sorting algorithm is only marginally more difficult to implement … Read more

advertisement

C Program to Implement Bitonic Sort

This C Program implements bitonic sort. Here is source code of the C Program to implement bitonic sort. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C Program to Implement Bitonic sort */#include <stdio.h>#include <stdlib.h>#define MAX 8#define SWAP(x,y) t = x; x = y; … Read more

advertisement

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
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.