Given an array, arr[] and integer X. Find all the possible triplets from an arr[] whose sum is either equal to less than X. Example:… Read More
Category Archives: Sorting
Exchange sort is an algorithm used to sort in ascending as well as descending order. It compares the first element with every element if any… Read More
Given a matrix arr[][] which is sorted by the increasing number of elements and a number X, the task is to find the position where… Read More
Given a sorted array A[] of size N and an integer M. You need to divide the array A[] into M non-empty consecutive subarray (1… Read More
In this article, we will discuss the grail sort. Grail sort is a sorting algorithm that was introduced by Vladimir Yaroslavskiy. It is an efficient… Read More
Given an array nums[] of length N which contains integers, the task is to find a subarray such that the first and the last element… Read More
Given an array arr[] of size n, the task is to find the maximum possible size x of a group such that the difference between… Read More
Given an array arr[], the task is to find the minimum operations required to sort the array in increasing order. In one operation, you can… Read More
Comb Sort: The pre-processing stage of Comb Sort is similar to the Shell Sort method. Comb sort is a significant advancement over bubble sort, and… Read More
Given an array, arr[] containing n integers, the task is to find an integer (say K) such that after replacing each and every index of… Read More
Given an array arr[] of size N, Return the number of permutations of array arr[] which satisfy the condition arr[1] & arr[2] & . .… Read More
Given an integer N, denoting the size of a circular array containing non-zero elements and an array arr[] of size M having the indices of… Read More
Given an array A[] of length N, the task is to find the maximum sum calculated by multiplying subsequence sum with its length and removing… Read More
Balanced merge is a type of sorting algorithm where data is stored on multiple tapes (or other forms of storage). The tapes are divided into… Read More
What is BurstSort? BurstSort is an advanced sorting algorithm developed by Tony P. Hoare and Charles M. Payne in 1997. It is a hybrid of… Read More