×

Loading...

大学时看过的一道算法题,据说也是现在Google招程序员的面试题。

sailor (Ocean & Mountain)
Every man in a village of 100 married couples has cheated on his wife. Every wife in the village instantly knows when a man other than her husband has cheated, but does not know when her own husband has. The village has a law that does not allow for adultery. Any wife who can prove that her husband is unfaithful must kill him that very day. The women of the village would never disobey this law. One day, the queen of the village visits and announces that at least one husband has been unfaithful. What happens?
(#10018553@0)
2016-3-30 -05:00
Reply
Page address has been copied.
To share, click to copy page address.
Share Online by QR Code

Back To Topic: 大学时看过的一道算法题,据说也是现在Google招程序员的面试题。

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习学科技术