Given a sorted array arr[] consisting of N integers and a positive integer K(such that N%K is 0), the task is to find the minimum… Read More

# Tag Archives: median-finding

Given a Binary Search Tree (BST)consisting of N nodes and two nodes A and B, the task is to find the median of all the… Read More

Given an array arr[] consisting of N positive integers, the task is to find an array element X such that sum of its absolute differences… Read More

Given two integers mean and mode, representing the Mean and Mode of a random group of data, the task is to calculate the median of… 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 an array, arr[] of size N, the task is to find the median of sums of all possible subsets of the given array. Examples:… Read More

Given a string S of length N consisting of ‘x’ and ‘.’. The given string represents a row of seats where ‘x’ and ‘.’ represent… Read More

Given two integers K, X, and an array arr[] consisting of N distinct elements, the task is to find X elements closest to the Kth… Read More

Given two arrays arr[] of N integers and W[] of N weights where W[i] is the weight for the element arr[i]. The task is to… Read More

Given a matrix mat[][] consisting of N pairs of the form {x, y} each denoting coordinates of N points, the task is to find the… Read More

Given an array arr[] of length N, the task is to find the median of the differences of all pairs of the array elements. Example:… Read More

Given an array arr[] consisting of N integers, denoting N points lying on the X-axis, the task is to find the point which has the… Read More

Given an array A[] of size greater than integer K, the task is to find the total number of elements from the array which are… Read More

Given an array arr[] of N elements and an integer K, the task is to perform at most K operation on the array. In the… Read More