Aggressive cows

https://ide.codingblocks.com/s/369790

Ek test case galat aara ha bhaiya isma

Modified Code

mistake

  1. initialize last cow with a[0] not with 0
  2. start cnt with 1 not with 0

bahiya par aasa case bhi to ho skta haana ki koi configuration form hi na ho

to us case mai cnt = 0 hi hoga na

Hey @sehrawat
Configuration is not possible only if cows >stalls
but according to ques cows will always be less than stalls
So u dont have to worry about it

Oh my bad ,u are asking about this

So we always place 1 cow and check for rest if config is possible or not