Help with this interview question
You have the option to bet whether or not there are two dogs in the world with the same number of hairs. would you take that bet?
I answered I would take a sample of 1,000 dogs, find the standard deviation, and do a p test to gain conviction. what would you do?
If you have 'n' items and 'm' containers, where 'n' is greater than 'm', then at least one container must hold more than one item. This is the Pigeonhole Principle, dog hairs don't go to infinity, lets assume 10M. since there are way more dogs than 10M in the world, its a given that at least one of them has to match hair counts. Also... arent there hairless dogs, at least in the colloquial sense?
Looks like someone paid good attention in CIS 160 or whatever your school's version of it was. Elite approach and answer to the question - thanks for jogging up those memories for me too.
I started ok the later end of that. Say there are 50M dogs on the world, it would only take 1 orphan disease case to cause dogs to grow no hair. A certain number of dogs have to inevitably have the disease as well. Love your approach!
Mollitia quia placeat tempore dolores nobis corrupti possimus. Occaecati hic nam occaecati et temporibus. Aut aut facere maiores exercitationem.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...