Given an array arr[] of size N and an integer K, the task is to find all the array elements that appear more than (N… Read More

# Category Archives: Sorting

Given two arrays A[] and B[] of size N and an integer K, the task is to check if all possible subset-sums of subsets of… Read More

Given an array arr[] consisitng of N integers and an integer K, the task is to find the Kth smallest element in the array using… Read More

Given a circular array arr[] of size N and two integers K and M, the task is to sort M array elements starting from the… Read More

Given an array arr[] consisting of N integers, the task is to sort the array in non-increasing order by minimum number of anti-clockwise rotations. If… Read More

Given a string str of length N and an integer K, the task is to check if a string has two non-overlapping substrings of length… Read More

Given two arrays A[], consisting of N integers, and B[], consisting of taste values of M chocolates and an integer X, the task is to… Read More

Given an array arr[] of size N representing integers required to be read as a data stream, the task is to calculate and print the… Read More

Given a 2D array arr[][] with each row of the form { X, Y }, where Y and X represents the minimum cost required to… Read More

Given an array A[ ] consisting of N positive integers, such that each array element Ai denotes the count of elements of ith type, the… Read More

Given a vector of pairs arr[] and Q queries in the form of pairs in an array Queries[], the task for each query is to… Read More

Given an array, arr[] of size N whose elements from left to right, must be read as an incoming stream of integers, the task is… Read More

Given an array arr[] consisting of N distinct integers, the task is to rearrange the array such that no element is same as its index… Read More

Given a 2D array ranges[][] of size N * 2, with each row representing a range of the form [L, R], the task is to… Read More