# Category Archives: Sorting (adsbygoogle = window.adsbygoogle || []).push({});

## Count the maximum number of elements that can be selected from the array

Given an array arr[], the task is to count the maximum number of elements that can be selected from the given array following the below… Read More »

## Sorting Algorithms Visualization : Bubble Sort

The human brain can easily process visuals in spite of long codes to understand the algorithms. In this article, Bubble sort visualization has been implemented… Read More »

## Print combinations of distinct numbers which add up to give sum N

Given a positive integer N, the task is to find out all the combinations of positive integers that add upto the given integer N. The… Read More »

## Count the triplets such that A[i] < B[j] < C[k]

Given three array A[], B[] and C[] of N integers each. The task is to find the count of triplets (A[i], B[j], C[k]) such that… Read More »

## Check whether an array can be made strictly increasing by modifying atmost one element

Given an array arr[] of positive integers, the task is to find whether it is possible to make this array strictly increasing by modifying atmost… Read More »

## Check if the given matrix is increasing row and column wise

Given a matrix mat[][], the task is to check if the given matrix is strictly increasing or not. A matrix is said to be strictly… Read More »

## Check if the given array contains all the divisors of some integer

Given an integer array arr[], the task is to check if that array contains all the divisor of some integer. Examples: Input: arr[] = {… Read More »

## Sort an alphanumeric string such that the positions of alphabets and numbers remain unchanged

Given an alphanumeric string str, the task is to sort the string in such a way that if a position is occupied by an alphabet… Read More »

## Find number from its divisors

Given an array arr[] of N integers. The integers represent all the divisors of a number X except 1 and X itself. The task is… Read More »

## Find the largest interval that contains exactly one of the given N integers.

Given an array arr[] of N distinct integers, the task is to find the maximum elements in an interval [L, R] such that the interval… Read More »

## Maximize the size of array by deleting exactly k sub-arrays to make array prime

Given an array arr[] of N positive integers and a non negative integer K. The task is to delete exactly K sub-arrays from the array… Read More »

## Sort an array according to count of set bits | Set 2

Given an array arr[] of positive integers, the task is to sort the array in decreasing order of count of set bits in binary representations… Read More »

## Count of integers of the form (2^x * 3^y) in the range [L, R]

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

## Program to print an array in Pendulum Arrangement with constant space

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 / Brick Sort using pthreads

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 »