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 #163

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Add zebra-puzzle exercise #163

merged 1 commit into from
Oct 24, 2024

Conversation

ageron
Copy link
Contributor

@ageron ageron commented Oct 22, 2024

I found this one surprisingly tricky, perhaps because I started using tags for everything, and it made the code really ugly, because of all the conversions (in order to iterate over the tags), and it also meant that every field (drink, activity, etc.) had to be treated separately, there was special logic everywhere, yuck.
I also tried to write a more general algorithm that would work for other constraint-satisfaction problems such as Sudokus, but again it was a bit ugly.
So I ended up with a kind of boring solution, I'm not super happy with it, but I'm not sure how to improve it.

Copy link
Contributor

@isaacvando isaacvando left a comment

Choose a reason for hiding this comment

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

Looks good! I don't have any suggestions for improving it on first glance

@ageron ageron merged commit 8b00510 into exercism:main Oct 24, 2024
4 checks passed
@ageron ageron deleted the add-zebra-puzzle branch October 24, 2024 00:27
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