


The first line of the input contains an integer 'T' denoting the number of test cases.
The first line of each test case contains two space-separated integers 'N' and 'M', the number of jars, and the minutes after which his mother comes back.
The second line of each test case contains 'N' space-separated integers, the number of chocolates present in 'N' jars.
For every test case, the only line of output should contain an integer 'X', the minimum chocolate-eating speed of Ninja as described in the problem statement.
Print the output of each test case in a separate line.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 5
1 <= N <= 10^6
N <= M <= 10^9
1 <= chocolates[i] <= 10^9
Time limit: 1 sec
The brute force approach to this problem is that we continuously iterate on the speed of eating chocolates till Ninja can eat all the chocolates within ‘M’ Minutes.
Since our search space(‘chocolates’) is very high, we can use binary search to efficiently find the minimum chocolate-eating speed. We can use the fact that if ‘X’ is the minimum eating speed, then every value which is larger than ‘X’ will also satisfy the condition.
Element Count in Ranges
First Digit One
Minimize Maximum Adjacent Distance
Sorted Doubly Linked List to Balanced BST
Minimized Maximum of Products Distributed to Any Store