Given a range [L, R] where 0 ≤ L ≤ R ≤ 108. The task is to find the count of integers from the given… Read More

# Category Archives: Sorting

Given an array arr[] of integers, the task is to arrange them in a way similar to the to-and-fro movement of a Pendulum without using… Read More

Odd-Even Transposition Sort is a parallel sorting algorithm. It is based on the Bubble Sort technique, which compares every 2 consecutive numbers in the array… Read More

Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the… Read More

Given two arrays u and v, representing a graph such that there is an undirected edge from u[i] to v[i] (0 ≤ v[i], u[i] <… Read More

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More

Given an integer N in the form of string, the task is to find the largest even number from the given number when you are… Read More

Given two arrays arr1[] and arr2[], player A picks an element from arr1[] and player B picks an element from arr2[], the player which has… Read More

Given a Binary Search Tree and an integer sum, the task is to find all the pairs from the tree whose sum is equal to… Read More

Given an array arr[] of strings, the task is to reorder the strings lexicographically and print their positions in the original list. Examples: Input: arr[]… Read More

Given two arrays box[] and truck[] where box[i] represents the weight of the ith box and truck[i] represents the maximum load that the ith truck… Read More

Given an array of pairs arr[], the task is to find the maximum cost choosing at most K pairs. The cost of an array of… Read More

Given an array arr[] of integers, the task is to find the minimum number greater than the maximum element from the array which cannot be… Read More

Given width and height of N rectangles. The task is to find the minimum number of rectangles left after inserting one into another. Note :… Read More

Given a number N, the task is to find the largest number less than or equal to the given number N such that on rearranging… Read More