Skip to content

Category Archives: Sorting

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
Given a string S consisting of lower case letters and an integer K, the task is to remove minimum number of letters from the string,… Read More
Given an integer array A[] of size N, the task is to check if the array can be divided into two subsequences such that appending… Read More
There have always been arguments about how can be a sorting algorithm of linear time complexity be achieved, as all the traditional sorting algorithms are… Read More
In certain sorting problems, if the data is already sorted the complexity of the sorting algorithm changes. That is it can be said that the… Read More
Given a positive integer N, the task is to find the largest possible value of N after any number of swaps is made between digits… Read More
Given N tasks and N people who can work on them. Each task requires A[i] (0 <= i <= N-1) units of work to complete… Read More
Given an array arr[] of size N, the task is to find the last element remaining after removing all elements closest to sum/2 sequentially where… Read More
Given two arrays arr1[] and arr2[] of length N each and an integer K, The task is to maximize the number of equal elements at… Read More
Given a string S and a list of strings subs[] that stores the substrings of S and all the substrings are present only once, the… Read More

Start Your Coding Journey Now!