Given an array arr[], the task is to find the lexicographically largest triplet in that array that can form a triangle. If no such triplet… Read More

# Category Archives: Sorting

Given a list of N distinct integers and a list of N-1 inequality signs, the task is to insert the integers between the inequality signs,… Read More

Given an integer K and a matrix of size N x M, where each matrix element is equal to the product of its indices(i *… Read More

Given an array A[] consisting of N numbers denoting the values written on N steps, the task is to find the alpha score of the… Read More

Given an array arr[], the task is to find the minimum cost to remove all elements from the array where cost of removing an element… Read More

An algorithm like Heap sort can be understood easily by visualizing. In this article, a program that visualizes the Heap Sort Algorithm has been implemented.… Read More

Given a string array arr[] as input, the task is to print the words sorted by number of distinct characters that occur in the word,… Read More

Given an array A[ ] of size N and two integers K and D, the task is to calculate the minimum possible number of operations… Read More

Given an array arr[] and integer K, the task is to split the array into subsets of size K, such that each subset consists of… Read More

Given an array arr[] and an integer K, that task is to choose at most K elements of the array and replace it by any… Read More

Check whether two strings can be made equal by reversing substring of equal length from both strings

Give two strings S1 and S2, the task is to check whether string S1 can be made equal to string S2 by reversing substring from… Read More

Given an array arr[], the task is to find the length of the largest subset with the sum of elements less than or equal to… Read More

Given array arr[] of positive integers, an integer Q, and arrays X[] and Y[] of size Q. For each element in arrays X[] and Y[],… Read More

Given an array arr[] of N strings and an integer K, the task is to print K strings which occurred the most number of times… Read More