Solve the zebra puzzle.
Each of the five houses is painted a different color, and their inhabitants are of different national extractions, own different pets, drink different beverages and smoke different brands of cigarettes.
Which of the residents drinks water? Who owns the zebra?
zebraOwner methods from the
They must return a string each, whose values are the answers to the zebra-puzzle questions "Who drinks water?" and "Who owns the Zebra?".
Each answer will be one of the resident's nationalities: Englishman, Spaniard, Ukrainian, Norwegian, or Japanese.
Obviously, you could simply write two single-statement function if you peek at the test program to see the expected solution. But the goal is to develop an algorithm which uses the given facts and constraints for the puzzle and determines the two correct answers.