# Category Archives: Sorting

Given an array stream of n integers in the form of a stream, the task is to find the minimum number of operations that are… Read More
What are sorting networks in parallel computing? Sorting networks are comparison networks that always sort their inputs. They are also known as comparison networks. Comparison… Read More
Given two arrays A[] and B[] of size N and M respectively denoting the required elements of each group and the number of elements in… Read More
Given an input arr[] of length N, Which contains integers from 1 to N in unsorted order. You can apply only one type of operation… Read More
Given an array of positive integer arr[] of length N and an integer Z, (Z > arr[i] for all 0 ≤ i ≤ N –… Read More
Given a sorted array arr[] of size N and integer K, the task is to split the array into K non-empty subarrays such that the… Read More
Given an array Arr of length N, it is reduced by 1 element at each step. Maximum and Minimum elements will be removed in alternating… Read More
Given an array arr[] of N integers and an integer K, where K denotes the maximum number of operations which can be applied to the… Read More
Given a 2D array arr of size N which represents an interval [start, end] inclusive where (start < end), the task is to add only… Read More
Given an array of strings arr[] of length N, the task is to sort the strings in Lexicographical order. Examples: Input: arr[] = {“batman”, “bat”,… Read More
Given an array of positive integers arr[] of length N and a query array query[] of length M, the task is to find the maximum… Read More
Given an array A of size N, the task is to find the minimum number of operations required to make array A empty. The following… Read More
You are given an array arr[] of size N, the task is to determine the MEX of the array. MEX is the smallest whole number… Read More
Given two arrays x[] and y[] of N integers, the task is to form an array z[] of x[i] + y[j], (0 ≤i, j <… Read More
Given an array arr[] of N elements ranging from 0 to N-1(both included), the task is to rearrange the array such that the sum of… Read More