C Program to Implement Radix Sort — LSD with Counting Sort Explained

Radix Sort is a non-comparison sorting algorithm — it never compares two elements directly. Instead, it sorts by processing individual digits, one digit position at a time from least significant to most significant (LSD approach). This lets it sort integers in O(n) time for a fixed number of digits, breaking the O(n log n) lower …

Merge Sort in C – Algorithm, Program, and Complexity

Merge sort in C is a classic divide-and-conquer sorting algorithm that guarantees O(n log n) time in all cases. It splits an array into halves, recursively sorts each half, then merges the sorted halves back together. Unlike bubble sort or insertion sort, merge sort never degrades to O(n²) — making it the preferred choice when …

Insertion Sort in C – Program, Algorithm and Complexity

Insertion sort is one of the simplest sorting algorithms and works exactly the way you sort a hand of playing cards. You take one card at a time and insert it into its correct position among the cards already sorted in your hand. It sorts the array one element at a time, building the sorted …

C Program to Implement Heap Sort — Algorithm, Tree Visualization, and Complexity

Heap Sort is a comparison-based sorting algorithm that uses a binary heap data structure. Its standout property: it is guaranteed O(n log n) in all cases — best, average, and worst — while using only O(1) extra memory. No Quick Sort worst-case surprises, no Merge Sort extra array. Key Concept — The Max-Heap A max-heap …

C Program to Implement Quick Sort — With Explanation and Complexity

Quick Sort is one of the fastest and most widely used sorting algorithms. It uses a divide-and-conquer strategy: pick a pivot element, partition the array so everything smaller than the pivot is on its left and everything larger is on its right, then recursively sort each side. The pivot ends up in its final sorted …

C program to accept N numbers and arrange them in an descending order

C Sorting,C program to accept N numbers and arrange them in an descending order. Program will accept the array of elements, and returns the elements in descending order. Program use the Bubble sort Technique to sort the Array. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for …