For test case: 1 2 6 17
where t=1, n=2 and array is [6,17] ans should be 2 but if you add this test case many solution will give ans as 1 instead of 2.