Queries for number of array elements in a range with Kth Bit Set
Given an array arr[] of n positive integers and q queries, in which each query have an integer k. For each query, the task is to output the minimum size of subarray whose binary representation of each elements if concatenated will have at least k number of set bits. If no such array exist, print -1. Examples: Input… Read More »