BFE.dev
Front-End Interview Questions157. will the sheep be eaten?

157. will the sheep be eaten?

Fun
Share

Suppose there are 100 wolves and 1 sheep.

  1. wolf could eat grass but they prefer eating sheep
  2. once a wolf eats a sheep, the wolf becomes the sheep
  3. all wolves are rationale and first priority is to live

Question: will this sheep be eaten? what if there are n wolves?

prevnext
Request SolutionAIPosts(7)