Given an array, arr[] of size N., The task is to perform minimum increment or decrement operations on the elements of the array, to make… Read More

# Tag Archives: median-finding

We are given a row-wise sorted matrix of size r*c, we need to find the median of the matrix given. It is assumed that r*c… Read More

Given an array arr[] of size N containing positive integers, the task is to find the maximum number of elements that can be deleted from… Read More

Given two positive integers N and X. The task is to print the maximum median possible by generating an Array of size N with sum… Read More

Minimize value of x that minimizes value of |a1−x|^c+|a2−x|^c+···+|an−x|^c for value of c as 1 and 2

Given an array arr[] of N elements, the task is to find the value of x that minimizes the value of expression for c =… Read More

Given an array A[] of N integers where N is even, . the task is to generate an array of medians where the median of… Read More

Given an array arr[ ] of size N, the task is to find the minimum possible value of the expression abs(arr[1] – (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