GUI(Graphical User Interface) helps in better in understanding than programs. In this article, we will visualize Counting Sort using JavaScript. We will see how the… Read More

# Tag Archives: counting-sort

Given an array arr[] having N distinct positive elements, the task is to generate another array B[] such that, for every ith index in array… Read More

Given a constant array of N elements which contain elements from 1 to N – 1, with any of these numbers appearing any number of… Read More

Given an array arr[] and a number K, where K is smaller than the size of the array, we need to find the Kth smallest… Read More

Counting Sort is one of the best sorting algorithms which can sort in O(n) time complexity but the disadvantage with the counting sort is it’s… Read More

Given a string str and an array of strings arr[], the task is to check if the given string can be formed by any of… Read More

Given n strings, we need to sort those strings such that every string is a substring of all strings after it. If not possible to… Read More

Given an array with integer elements in small range, sort the array. We need to write a non-comparison based sorting algorithm with following assumptions about… Read More

Given an n sized unsorted array, find median and mode using counting sort technique. Thia can be useful when array elements are in limited range.… Read More

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s… Read More

Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key… Read More

Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key values… Read More