Skip to content

Category Archives: Sorting

Given an array arr[] consisting of N positive integers, the task is to sort the array such that –  All even numbers must come before… Read More
Given an array, arr[] of M integers, where the ith element represents the time after which the ith bomb will blast after dropping it, and… Read More
QuickSort is a Divide and Conquer Algorithm. It picks an element as a pivot and partitions the array around the picked pivot. There are many… Read More
Given two sorted arrays A[] and B[] of sizes N and M respectively, the task is to merge them in a sorted manner. Examples: Input:… Read More
Given an array arr[], consisting of N distinct positive integers and an integer K, the task is to find the lexicographically smallest permutation of the… Read More
Given an array arr[] consisting of N integers, the task is to split the array into the minimum number of disjoint groups, such that differences… Read More
Given a positive integer M and an array consisting of N distinct positive integers, the task is to remove the first M smallest elements from… Read More
Given an array arr[] consisting of N pairs and a positive integer K, the task is to select the minimum number of pairs such that… Read More
Given an array arr[] consisting of N integers, the task is to make all array elements equal by replacing the leftmost largest element of the… Read More
Given an array arr[] consisting of N positive integers, the task is to find the product of the maximum of all possible subsets of the… Read More
Given two positive integers X and Y and an array arr[] consisting of N positive integers such that arr[i] represents the height of the ith… Read More
Given an array arr[] consisting of N positive integers, the task is to minimize the number of operations required to minimize the absolute difference between… Read More
Given an integer array, arr[] of size N and an integer X. The task is to sort the array in increasing order in a minimum… Read More
Given two unsorted Linked Lists, L1 of N nodes and L2 of M nodes, the task is to merge them to get a sorted singly… Read More
Given an array arr[] of size N, which contains a permutation of numbers from 1 to M, as well as an element that is repeated(one… Read More

Start Your Coding Journey Now!