## Sort the numbers according to their product of digits

Given an array arr[] of N non-negative integers, the task is to sort these integers according to the product of their digits. Examples: Input: arr[]… Read More »

- Sort an array without changing position of negative numbers
- Count the triplets such that A[i] < B[j] < C[k]
- Find the longest string that can be made up of other strings from the array
- Two nodes of a BST are swapped, correct the BST | Set-2
- Find maximum meetings in one room
- Greatest contiguous sub-array of size K
- Merge two BSTs with constant extra space
- Maximum water that can be stored between two buildings
- Pair with largest sum which is less than K in the array
- Find a triplet in an array whose sum is closest to a given number
- Count pairs with given sum | Set 2
- Find minimum changes required in an array for it to contain k distinct elements
- Maximum Length Chain of Pairs | Set-2
- Sort an array of strings based on the frequency of good words in them
- Unbounded Fractional Knapsack
- Rearrange the characters of the string such that no two adjacent characters are consecutive English alphabets
- Program to print an array in Pendulum Arrangement with constant space
- Sort an array of strings according to string lengths using Map
- Remove elements to make array sorted
- Sort the Queue using Recursion
- Check whether an array can be made strictly decreasing by modifying at most one element
- Find the winner of the match | Multiple Queries
- Create a Sorted Array Using Binary Search
- Smallest element greater than X not present in the array
- Alternate XOR operations on sorted array
- Print elements of an array according to the order defined by another array | set 2
- Sort an array according to absolute difference with given value using Functors
- Case-specific Sorting of Strings
- Merge two sorted arrays in constant space using Min Heap
- Print combinations of distinct numbers which add up to give sum N

Given an array arr[] of N non-negative integers, the task is to sort these integers according to the product of their digits. Examples: Input: arr[]… Read More »

Given four integers A, B, C and K. Assume that all the multiples of A, B and C are stored in a set in sorted… Read More »

Given an array arr[] of N integers, the task is to sort the array in non-decreasing order by performing the minimum number of operations. In… Read More »

Given an array arr[] of positive integers, the task is to find the minimum steps to reduce all the elements to 0. In a single… Read More »

Quickselect is a selection algorithm to find the k-th smallest element in an unordered list. It is related to the quick sort sorting algorithm. Examples:… Read More »

Given two arrays A[] and B[] and two integers X and Y, the task is to choose X elements from A[] and Y elements from… Read More »

Given an array arr[] of N integers representing the lengths of the gloves, the task is to count the maximum possible pairs of gloves from… Read More »

Given an array arr[] of N elements and the task is to count the number of elements from this array which are not at the… Read More »

Given a string str of alphanumeric characters, the task is to sort the similar group of consecutive characters separately and print the modified string i.e.… Read More »

Given two sorted arrays, we need to merge them with O(1) extra space into a sorted array, when N is the size of the first… Read More »

Given an array arr[] of integers and an integer K. The task is to sort the elements of the given array in the increasing order… Read More »

Given N strings containing of characters ‘a’ and ‘b’. These string can be concatenated in any order to make a single final string S. The… Read More »

Given an array arr[] of N elements and an integer K, the task is to make any K elements of the array equal by performing… 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 »

Pre-requisite: Selection Sort The human brain can easily process visuals in spite of long codes to understand the algorithms. In this article, Selection Sort visualization… Read More »