|All-time Popular Problems|
|Construct Tree from Inorder & Preorder|
|Sum of two large numbers|
|Level order traversal in spiral form|
|Spirally traversing a matrix|
|Angle between hour and minute hand|
|Binary Tree to DLL|
|Smallest Positive missing number|
|Height of Binary Tree|
|Largest Number formed from an Array|
Given a sorted array of distinct elements and an integer k. The array elements denote positions of points on 1-D number line, find the maximum size of subset of points that can have consecutive values of points which can be formed by placing another k points on the number line.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. First line of each test case contains two integers N and K and the second line contains N space separated array elements.
For each test case, print the maximum size of subset containing consecutive values in new line.
1 2 3 4 10 11 14 15
11 12 15