Wrong output in aggressive cows problem

i have written the code for this problem as suggested in the video but it is giving wrong output . what is gone wrong in the below code?

@Raghavsingla522 you need to sort the stalls array.

@Raghavsingla522 you need to change this line as well (in the cowsplace function)
image

@Raghavsingla522 updated code:

1 Like

yeah! i got the output thanks :+1:

@Raghavsingla522 please mark the doubt as resolved