Please explain the input

what does 1 2 8 4 9
represents
and how id the out put calculated 2-1
8-2
4-8
9-4?

@radhagovinda008
In this problem titled Aggressive Cows,
We need to maximize the gap between two adjacent Cows kept in the yarn and return the minimum of all these maximums.
For example consider: 5 Array Elements as 1 2 8 4 9
And let’s say cows are 3.
The Final answer, here is 3.
Solution: As the farmer can put his 3 cows in the stalls at positions 1, 4 and 8,
resulting in a minimum distance of 3 among 3(4-1),4(8-4) being the adjacent distances among the 3 positions.
Now your task is to implement the above approach without considering about the Time Complexity or Anything.
Then we are here to further help you.

I am not getting what is stall number 1,2,4,8,9 are these number of stalls?

are this position of the stall ?

@radhagovinda008
These are position of stalls.

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.