## Sort an Increasing-Decreasing Array

Given a K-increasing-decreasing array arr[], the task is to sort the given array. An array is said to be K-increasing-decreasing if elements repeatedly increase upto… Read More »

- Sort an array without changing position of negative numbers
- 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
- 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
- Sort an array of strings according to string lengths using Map
- 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
- 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
- Merge K sorted Doubly Linked List in Sorted Order
- Longest subsequence with first and last element greater than all other elements
- Number of subarrays having absolute sum greater than K | Set-2
- Minimum increment or decrement operations required to make the array sorted
- Case-specific sorting of Strings in O(n) time and O(1) space
- Find the first N pure numbers
- Count of elements which are not at the correct position

Given a K-increasing-decreasing array arr[], the task is to sort the given array. An array is said to be K-increasing-decreasing if elements repeatedly increase upto… Read More »

Given an array arr[] of size N which represents the initial number on each card and given a two dimensional array B[][] of size M… Read More »

Given four arrays containing integer elements and an integer sum, the task is to count the quadruplets such that each element is chosen from a… Read More »

Given a level-order sorted complete binary tree, the task is to check whether a key exists in it or not. A complete binary tree has… Read More »

Given an array arr[] of N elements and a positive integer K such that K ≤ N. The task is to find the number of… Read More »

Given an array of infinite length and two integers M and N which are co-primes, the task is to find the number of positions that… Read More »

Given a matrix, the task is to convert the given Matrix into sorted Spiral Matrix. Examples: Input: y[][] = { { 2, 5, 12 },… Read More »

Given an array arr[] of N integers, the task is to find the maximum mod value for any pair (arr[i], arr[j]) from the array. Examples:… Read More »

Given an array arr[] of N integers and two players A and B are playing a game where the players pick the element with the… Read More »

Given two string S1 and S2, the task is to check whether both the strings can be made equal by performing the given operation on… Read More »

Given a stack of integers and an integer K, the task is to sort the elements of the given stack using another stack in the… Read More »

Given an array arr[] of length N, the task is to find the length of the largest sub-sequence with non-negative sum. Examples: Input: arr[] =… Read More »

Given N ranges [L, R] with velocities vel[]. The task is to assign each range a direction i.e. either left or right. All the ranges… Read More »

Consider n points on the Cartesian Coordinate Plane. Let point (Xi, Yi) is given a value Vi. A line parallel to y-axis is said to… Read More »

Given an array of red, blue and yellow objects, the task is to use an in-place sorting algorithm to sort the array in such a… Read More »