## Minimum Circles needed to be removed so that all remaining circles are non intersecting

Given n Circles present in x-y plane such that all the circles have their center aligned on the x-axis. The task is to remove some… Read More »

## Sort an array according to absolute difference with given value using Functors

Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., the element… Read More »

## Case-specific Sorting of Strings

Given a string str consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase characters separately such that if the ith… Read More »

## Compress the array into Ranges

Given an array of integers of size N, The task is to print the consecutive integers as a range. Examples: Input : N = 7,… Read More »

## Sort the character array based on ASCII % N

Given an array arr[] of characters and an integer M, the task is to sort the array based on ASCII % M i.e. the character… Read More »

## Check whether an array can be made strictly decreasing by modifying at most one element

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

## Two nodes of a BST are swapped, correct the BST | Set-2

Given a Binary Search Tree with two of the nodes of the Binary Search Tree (BST) swapped. The task is to fix (or correct) the… Read More »

## Longest subsequence with first and last element greater than all other elements

Given a permutation from 1 to N of size N. Find the length of the longest subsequence having the property that the first and last… Read More »

## Create a Sorted Array Using Binary Search

Given an array, the task is to create a new sorted array in ascending order from the elements of the given array. Examples: Input :… Read More »

## Merge two BSTs with constant extra space

Given two Binary Search Trees(BST), print the elements of both BSTs in sorted form. Note: Both the BSTs will not have any common element. Examples:… Read More »

## Print elements of an array according to the order defined by another array | set 2

Given two arrays a1[] and a2[], print elements of a1 in such a way that the relative order among the elements will be the same… Read More »

## Check whether we can sort two arrays by swapping A[i] and B[i]

Given two arrays, we have to check whether we can sort two arrays in strictly ascending order by swapping A[i] and B[i]. Examples: Input :… Read More »

## Find the largest possible k-multiple set

Given an array containing distinct positive integers and an integer k. The task is to find the largest possible k-multiple set from the array of… Read More »

## Remove elements to make array sorted

Given an array of integers, the task is to remove elements from the array to make array sorted. That is, remove the elements which do… Read More »

## Maximum water that can be stored between two buildings

Given an integer array which represents the heights of N buildings, the task is to delete N-2 buildings such that the water that can be… Read More »