C program to sort integers using Bubble Sort

This is a C Program to implement Bubble Sort Algorithm. Problem Description We have to input an array of numbers and sort them using Bubble Sort algorithm in C Language. Expected Input and Output 1. Average case (Unsorted array): When the input array has random distribution of numbers. For example: If the input array is … Read more

advertisement

C program to display sorted list using Bucket sort

This C program sorts elements of an integer array using Bucket sort. This is a linear time algorithm. Here is the source code of the C program to display sorted list using Bucket sort. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C … Read more

advertisement

C Program to Implement Radix Sort

Problem Description Write a C Program to Implement Radix Sort. Radix sort is a sorting technique. Here in radix sort, instead of comparing the elements with each other and placing them in their right order, we sort these elements in the collection digit by digit moving from Least significant bit to Most significant bit while … Read more

advertisement

C Program to Implement Quick Sort with Given Complexity Constraint

This is a C Program to implement Quick sort. This program sorts numbers using randomized quick sort. Here is source code of the C Program to Implement Quick Sort with Given Complexity Constraint. The C program is successfully compiled and run on a Linux system. The program output is also shown below. #include <stdio.h>#include <stdlib.h>#define … Read more

advertisement

C Program to Implement Stooge Sort Algorithm

This C program sorts a given array of integer numbers using Stooge Sort technique. Stooge sort is a recursive sorting algorithm with a time complexity of O(nlog 3 / log 1.5). The running time of the algorithm is thus extremely slow compared to efficient sorting algorithms, such as Merge sort, and is even slower than … Read more

advertisement

Shell Sort Algorithm in C

What is Shell Sort? Shell sort is a sorting algorithm called shell sort after the name of its inventor Donald Schell. Shellsort, also known as Shell sort or Shell’s method, is an in-place comparison sort. Shell sort algorithm is an improved version of the insertion sort algorithm but it can also be applied to bubble … Read more

advertisement

C Program to Implement Shaker Sort

This C program sorts a given array of integer numbers using Shaker Sort technique. Cocktail sort, also known as bidirectional bubble sort, cocktail shaker sort, shaker sort (which can also refer to a variant of selection sort), ripple sort, shuffle sort, or shuttle sort, is a variation of bubble sort that is both a stable … Read more

advertisement

C Program to Implement Counting Sort

This C program sorts a given array of integer numbers using Counting Sort technique. Counting sort is an algorithm for sorting a collection of objects according to keys that are small integers; that is, it is an integer sorting algorithm. It operates by counting the number of objects that have each distinct key value, and … Read more

advertisement

C Program to Sort Linked List using Merge Sort

This C program sorts an integer linked list using Merge Sort technique. A linked list cannot be accessed randomly and because of this slow access time, sorting algorithms like quick sort cannot be applied to it. So we use merge sort for this purpose. It works on divide and conquer technique. Time complexity is O(nlogn). … Read more

advertisement

C Program to Sort an Array using Randomized Quick Sort Technique

This C program sorts a given array of integer numbers using randomized Quick sort technique. It is comparison sort which works on divide and conquer technique. It is in-place partitioning algorithm and one of the fastest sorting techniques available till date. Average Time Complexity of this algorithm is O(nlog(n)). Here is the source code of … 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.