Introduction You would wonder, why we need bucket sort even though we have sorting algorithms that work in O(nlogn). Bucket
Continue readingCategory: Sorting
Kth largest/smallest element in an array
Problem Statement: Given an unsorted array, print Kth Largest and Smallest Element from an unsorted array. Examples: Example 1: Input:
Continue readingRadix Sort : Explained
Introduction Radix sort is a non-comparison-based stable algorithm that uses counting sort with a little modification to sort the numbers
Continue readingSelection Sort in C
Problem Statement: Given an array of N integers, write a program to implement the Selection sorting algorithm. Examples: Example 1: Input: N
Continue readingInsertion Sort in C
Problem Statement: Given an array of N integers, write a program to implement the Insertion sorting algorithm. Examples: Example 1: Input: N
Continue readingBubble Sort in C
Problem Statement: Given an array of N integers, write a program to implement the Bubble Sorting algorithm. Examples: Example 1: Input: N
Continue readingOperations on Arrays
What is an array? An array is a data structure that stores homogeneous/same data type values in it, and the
Continue readingMerge Sort Algorithm
Problem: Given an array of size n, sort the array using Merge Sort. Examples: Example 1: Input: N=5, arr[]={4,2,1,6,7} Output:
Continue readingInsertion Sort Algorithm
Problem Statement: Given an array of N integers, write a program to implement the Insertion sorting algorithm. Examples: Example 1: Input:
Continue readingSelection Sort Algorithm
Problem Statement: Given an array of N integers, write a program to implement the Selection sorting algorithm. Examples: Example 1: Input:
Continue reading