Lexpage, le premier site sans engagement    —  Guybrush

Discussions

10 questions typiques que l'on pose aux programmeurs

Guybrush 8429 Bob
Je fais partie de ceux qui lisent encore l'actualité sur G+ de temps en temps, notamment sur les groupes Python et Java, histoire de me tenir au courant, même de loin. Dans les posts récents (ça faisait une plombe que je n'avais pas été voir), il y en a un sympathique à base de problèmes mathématiques. C'est en anglais, mais je suis sûr que ça vous amusera de réfléchir aux solutions.

1) There are 27 coins and a two-pan balance. All coins has same weight except for one, which is heavier than all others. All coins looks identical. What is the minimum number of weighing required to certainly find out heavier coin?

2) There are two sticks which takes one hour to burn from one end to other. The sticks do not burn at a constant rate i.e. some part may burn faster than others. You need to measure 45 minutes by using these two sticks and a lighter.

3) Two persons are walking into a railway tunnel. Upon crossing 2/3rd of the tunnel, they saw train is coming from opposite direction. Each person ran for a different end of tunnel with speed of 10 km per hour. Fortunately, both persons escaped from the tunnel just right time i.e.. at the time train would have run through them. Assuming train was running with a constant speed and both persons reacted immediately, Find out speed of train.

4) There are thee switches outside of a closed room to operate three different light bulb inside the room. You can only go into the room once and you need to determine which switch belongs to which bulb. Just to make it clear, room is perfectly locked and its not possible to determine whether lights are on from outside the room.

5) You have 10 Jars filled with marbles. Each marble weighs 10 gm, except one Jar which contains defective marbles which weighs 9 gm. Given a scale to weigh, How do you find Jar with defective marbles in just one measurement. Here scale is modern day electronic scale to measure weight.

6) A person shoots her wife. Then holds her under water for 5 minutes. Finally, he hangs her. But after 10 minutes they both go out together and enjoy a wonderful dinner together. How can this be?

7) A father and son are going in a car and suddenly there car met accident. Father died on the spot but the child rushed to the hospital. When he arrives in the hospital, doctor says, "I can't operate on this child, he is my son!" How can this be?

8) You have a 5 liter Jug and a 3 liter Jug and unlimited supply of water. You need to measure exactly 4 liter of water but there is no measuring instrument or cup. Also Jugs are oddly shaped and doesn't contain any mark.

9) There are Four people needs to cross the bridge during night. The bridge can hold the weight of two people at a time and can not be crossed without a torch. Each person walk with different speed, first can cross the bridge in 1 minutes, second in 2 minutes, third in 5 minutes and fourth take 10 minutes to cross the bridge. If two persons go together, they walk with the speed of slower person. What is the least amount in which all four people cross the bridge.

10) A person's age is many days as his father's age in weeks and as many month as his grand father's age in years. If you combine age of all three it comes 120 years. What is the age of all three?

Répondre

Vous devez être inscrit et identifié.