sharkdp/great-puzzles

wizards and dwarves

Open

#13 opened on Sep 11, 2017

View on GitHub
 (10 comments) (0 reactions) (0 assignees) (37 forks)github user discovery
help wanted

Repository metrics

Stars
 (839 stars)
PR merge metrics
 (PR metrics pending)

Description

another possible solution to minimize the number of dwarves killed is as follows: each dwarf has to say 'black' or 'white'. Each dwarf speaks the color of the hat being worn by the dwarf in front of him/her. This way, only the first dwarf shall be killed in the worst case. All other dwarves shall know the color of their hat, for certainty.

Am I missing something ? it feels lot more simpler solution as compared with computing parity

Contributor guide