Skip to content

Instantly share code, notes, and snippets.

@brayden-morris-303
Last active August 29, 2015 14:01
Show Gist options
  • Save brayden-morris-303/725ebc023a887f171b46 to your computer and use it in GitHub Desktop.
Save brayden-morris-303/725ebc023a887f171b46 to your computer and use it in GitHub Desktop.
Circular Sheep Pen
As a shepherd, you have a cirle of 100 pens that you keep sheep in. A wolf comes along and starts at pen number 0. The wolf randomly moves right or left. When the wolf encounters a sheep, he eats it. In which pen would a sheep most likely survive the longest?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment