Can you describe one of testcase of CHEFSEG

can anyone describe any of the test case of CHEFSEG in NOV14 challenge.

for the input 10 3, initially consider a line on x axis of length 10. now to put 1st point, answer would be 5.0 since it divedes length 10 to 2 parts equally.
to make 2nd point, selection can be either 2.5 or 7.5 ie 1/2 length of 5. We will select 0.25 since it is closer to 0(this preference is mentioned in problem). 3rd point would be 7.5, so answer is 7.5

for 10 4, it would be 1.25
for 10 5, it would be 3.75 and so on

its 2.5 not 0.25

1 Like