Sha256: 94346d1c5c499c0ea0d91295eafc8cea36c6a0cab5c11a49b5f0b21ca2697175
Contents?: true
Size: 744 Bytes
Versions: 116
Compression:
Stored size: 744 Bytes
Contents
## Implementation Define a single function, SolvePuzzle, which returns a solution containing two strings, 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. For the SolvePuzzle function, use the following signature: ``` type Solution struct { DrinksWater string OwnsZebra string } func SolvePuzzle() Solution ``` Obviously, you could simply write a one-liner 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.
Version data entries
116 entries across 116 versions & 1 rubygems