Skip to content

Tag Archives: median-finding

Given an n sized unsorted array, find median and mode using counting sort technique. This can be useful when array elements are in limited range.… Read More
A median in an array with the length of n is an element which occupies position number (n+1)/2 after we sort the elements in the… Read More
Given a string s written in median form, change it back to the original string. The median letter in a string is the letter that… Read More
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… Read More
Given an unsorted array a[] of size N, the task is to find its mean and median.  Mean of an array = (sum of all… 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 the median of it.  If number of nodes are even: then median = ((n/2th node + ((n)/2th+1) node) /2 … 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, where N is the number of elements… Read More
Given that integers are read from a data stream. Find the median of elements read so for in an efficient way. For simplicity assume, there… 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!