Skip to content

Tag Archives: Order-Statistics

Given an infinite stream of integers, find the k’th largest element at any point of time.Example:  Input: stream[] = {10, 20, 11, 70, 50, 40,… Read More
Given a Binary Search Tree (BST) and a positive integer k, find the k’th largest element in the Binary Search Tree. For example, in the following… Read More
We recommend reading following posts as a prerequisite of this post.K’th Smallest/Largest Element in Unsorted Array | Set 1 K’th Smallest/Largest Element in Unsorted Array |… Read More
We recommend reading the following post as a prerequisite of this post. K’th Smallest/Largest Element in Unsorted Array | Set 1 Given an array and… Read More
We recommend to read following post as a prerequisite of this post.K’th Smallest/Largest Element in Unsorted Array | Set 1Given an array and a number… Read More
  Given an array and a number k where k is smaller than the size of the array, we need to find the k’th smallest… Read More
Given an array, find the largest element in it. Example:   Input : arr[] = {10, 20, 4} Output : 20 Input : arr[] = {20, 10,… Read More
Given an n x n matrix, where every row and column is sorted in non-decreasing order. Find the kth smallest element in the given 2D… Read More
Given the root of a binary search tree and K as input, find Kth smallest element in BST. For example, in the following BST, if k… Read More
  Question: Write an efficient program for printing k largest elements in an array. Elements in array can be in any order.For example, if given… Read More