Count number of pair such that (Max/min) is less than 2 in Array
Given an array arr[] of size N (0 < arr[i] < 106), the task is to find the total count of pairs such that by dividing the largest number by the smallest number of the pair, the result is < 2. Examples: Input: arr[ ] = { 3, 12, 5, 13 } Output: 2 Explanation: The two such… Read More »