##
Maximum value K such that array has at-least K elements that are >= K
June 23, 2016

Given an array of positive integers, find maximum possible value K such that the array has at-least K elements that are greater than or equal to K. The array is unsorted and may contain duplicate values. Examples : Input: [2, 3, 4, 5, 6, 7] Output: 4 Explanation : 4 elements [4, 5, 6, 7]… Read More »