Its wrong here, Please tell

I think Sir explained it wrong here. Sir told if the minimum separation is K, let K=3 , Then No. less than K can also be answer. I think it’s wrong, Sir should say That a number greater than K can also be answer as we want the Minimum Distance between 2 is as large as possible, But Then the minimum distance will be 2 or the number less than 3. Please help for that.

Hello @cbcao263,

There N stalls given in the question and you have to place C cows in them, such that the minimum distance between any two of them is as large as possible.

The minimum possible value of this minimum distance is the minimum distance between any two pairs of the Stalls.

Why wouldn’t it be smaller than 3 in your example?
Because the stalls are at fixed location and you cannot change the relative distance between them.

Hope, this would help.
Give a like if you are satisfied.

Sir I don’t understand this Question. Please help me in this problem. Please tell me any other way to answer this solution.

Hello @cbcao263,

You can refer to this video for an explanation of the approach.

and this video to understand the coding implementation.

Let me know if it still doesn’t help.

Suggestion:
Watch this video at a free time when you might not be solving any other problem.

Hope, this would help.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.