Skip to content

Instantly share code, notes, and snippets.

@soscler
Created May 15, 2019 11:51
Show Gist options
  • Save soscler/f03f695ae9e28132083ff1ecf2a7883f to your computer and use it in GitHub Desktop.
Save soscler/f03f695ae9e28132083ff1ecf2a7883f to your computer and use it in GitHub Desktop.
Zebra puzzle

The puzzle of Lewis Carroll:

A small street has five differently coloured houses on it. Five men of different nationalities live in these five houses. Each man has a different profession, each man likes a different drink, and each has a different pet animal. We have the following information:

  • The Englishman lives in the red house.
  • The Spaniard has a dog.
  • The Japanese is a painter.
  • The Italian drinks tea.
  • The Norwegian lives in the first house on the left.
  • The owner of the green house drinks coffee.
  • The green house is on the right of the white house.
  • The sculptor breeds snails.
  • The diplomat lives in the yellow house.
  • They drink milk in the middle house.
  • The Norwegian lives next door to the blue house.
  • The violinist drinks fruit juice.
  • The fox is in the house next to the doctor’s.
  • The horse is in the house next to the diplomat’s.

The question is who has the zebra and who drinks water?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment