Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zebra-puzzle exercise #475

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

glennj
Copy link
Contributor

@glennj glennj commented May 7, 2024

I'm sure there's an "eleganter" way solve this, but ...

glennj added 2 commits May 7, 2024 19:27
I'm sure there's an "eleganter" way solve this, but ...
Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Looking at the other languages this would normally be a function for each of the water drinker and the zebra owner. How come you have opted for a data structure holding both?

config.json Outdated
Comment on lines 1841 to 1842
"practices": [],
"prerequisites": [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the practices and prerequisites please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

@glennj
Copy link
Contributor Author

glennj commented May 9, 2024

Looking at the other languages this would normally be a function for each of the water drinker and the zebra owner. How come you have opted for a data structure holding both?

Once the puzzle is solved (once), both answers are known. Having to solve it twice is redundant.

I chose one test function with 3 assertions.

@lpil
Copy link
Member

lpil commented May 10, 2024

Please switch over to having two functions, as that's what the problem specification repo instructs. Thank you

@glennj
Copy link
Contributor Author

glennj commented May 10, 2024

Reworked as requested.

custom-types is no longer a prerequisite, as that's an implementation detail.

@glennj glennj requested a review from lpil June 7, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants