IBM interview questions (about 50 dogs, 50 people, sick dogs)

Source: Internet
Author: User

Question: there are 50 people in the village, each having a dog. Among the 50 dogs, there are sick dogs (this disease is not contagious), so people need to find the sick dogs.

Everyone can observe the other 49 dogs to determine whether they are ill (if they are ill, they can be seen). Only their dogs can be seen, and the observed results cannot be exchanged, the owner of the sick dog cannot be notified. Once the host determines that the dog in his house is a sick dog, the dog is shot at himself (the dog must be shot within one day after discovery), and each person only has the right to shoot his dog, there is no right to kill other dogs.

On the first day, we all finished reading it, but the gun didn't sound. On the third day, there was a gunshot and asked how many sick dogs were found in the village.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.