# Tag Archives: median-finding

Given an array arr[ ] of size N, the task is to find the minimum possible value of the expression abs(arr – (b + 1))… Read More
Given an array A[] consisting of N integers(1-based indexing), the task is to find the minimum value of the function  for any possible value of X.… Read More
Given an array arr[] of size N, the task is to find the minimum sum of absolute differences of an array element with all elements… Read More
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
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