# Tag Archives: Order-Statistics

We have a simple binary tree and we have to print the top 3 largest elements present in the binary tree.Examples:  Input : 1 /… Read More
Given two equally sized arrays (A, B) and N (size of both arrays). A sum combination is made by adding one element from array A and… Read More
Given an n x n matrix and integer k. Find the k’th smallest element in the given 2D array. Examples: Input : mat = [[10,… Read More
You are given an array of n-elements you have to find k smallest elements from the array but they must be in the same order… Read More
Given the data set, we can find k number of most frequent words. The solution of this problem already present as Find the k most… 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
Quickselect is a selection algorithm to find the k-th smallest element in an unordered list. It is related to the quick sort sorting algorithm.Examples:  Input:… 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
Given an array of n positive integers. We are required to write a program to print the minimum product of k integers of the given… Read More
Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative… Read More
You are given an array of n elements. You have to divide the given array into two group such that one group consists exactly k… Read More
Given two non-negative integers m and k. The problem is to find the m-th smallest number having k number of set bits.Constraints: 1 <= m,… Read More