Skip to content

Tag Archives: median-finding

Given an array of n integers. We are allowed to add k additional integer in the array and then find the median of the resultant… Read More
Given a sorted matrix of size n*n. Calculate the mean and median of the matrix .Examples:   Input : 1 2 3 4 5 6 7… Read More
Given n size unsorted array, find it’s mean and median.  Mean of an array = (sum of all elements) / (number of elements) Median of… Read More
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 a Binary Search Tree, find median of it. If no. of nodes are even: then median = ((n/2th node + (n+1)/2th node) /2 If no. of… Read More
Given an empty set initially and a number of queries on it, each possibly of the following types:   Insert – Insert a new element ‘x’.… Read More
We strongly recommend to refer below articles as a prerequisite of this. Randomized Algorithms | Set 1 (Introduction and Analysis) Randomized Algorithms | Set 2… Read More
Given two sorted arrays, a[] and b[], the task is to find the median of these sorted arrays, in O(log n + log m) time… Read More
Given that integers are read from a data stream. Find median of elements read so for in an efficient way. For simplicity assume, there are… Read More
  There are 2 sorted arrays A and B of size n each. Write an algorithm to find the median of the array obtained after… Read More

Start Your Coding Journey Now!