╨╧рб▒с>■ =?■ < ье┴q` Ё┐`DbjbjqPqP .F::'2 дддддддд╕╕╢$$$$$$$$^``````$╤h9 BДQд$$$$$Ддд$$╒222$jд$д$^2$^22дд2$а└3tв═ОО2^ы02{ { 2{ д2,$$2$$$$$ДД2$$$$$$$╕╕╕$▄$╕╕╕▄╕╕╕дддддд Google Interview а Questions Part - 1 а а а а а а а аThis is a list of interview puzzles used at а а Google. а а а а You have to get from point A to point B. You don?t know if you can get а а there. What would you do?Imagine you have a closet full of shirts. It?svery hard to find a а а shirt. So what can you do to organize your shirts for easy retrieval?What method would you use to look up a word in a dictionary? а а а а 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 herhusband а а has cheated, but does not know when her own husband has. The village has a а а law that does not allow foradultery.Anywife who can prove thather а а husband is unfaithful must kill him that very day. The women of the village а а would neverdisobeythislaw.One day, the queen of the village visits and а а announce that at least one husband has been unfaithful. What happens?You have eight balls all of the same size. 7 of them weigh the same, and а а one of them weighs slightly more. How can you fine the ball that is heavier а а by using a balance and only two weighings?How do youcutarectangular cake into two equal pieces when someone has а а already taken a rectangular piece from it? The removed piece an be any size а а or at any place in the cake. You are only allowed one straight cut.а а а а How many piano tuners are there in the entire world?а а а а а а аWhat gives you joy?а а а а аа а Mike has $20 more than Todd. How much does each have given that combined а а they have $21 between them. You can?t use fractions in the answer. Hint: а а This is a trick question, pay close attention to the condition)а а а а а а аHow many times a day a clock?s hands overlap?а а а а аа а Two MIT math graduates bump into each other. They hadn?t seen each а а other in over 20 years.а а а а The first grad says to the second: ?how have you been??а а а а а а аSecond: ?Great! I got married and I have three daughters now?а а а а а а аFirst: а?Really? how old are they??а а а а а а аSecond: а?Well, the product of their ages is 72, and the sum of their ages а а is the same as the number on that building over there..?а а а а а а аFirst: ?Right, ok.. oh wait.. I still don?t know?а а а а а а аsecond: ?Oh sorry, the oldest one just started to play the piano?а а а а а а аFirst: ?Wonderful! my oldest is the same age!? а а аProblem: How old are the а а daughters?а а а а If you look at a clock and the time is 3:15, what is the angle between а а the hour and the minute hands? (The answer to this is not zero!)а а Four people need to cross a rickety rope bridge to get back to their camp а а at night. Unfortunately, they only have one flashlight and it only has а а enough light left for seventeen minutes. The bridge is too dangerous to а а cross without a flashlight, and it?s only strong enough to support two а а people at any given time. Each of the campers walks at a different speed. а а One can cross the bridge in 1 minute, another in 2 minutes, the third in 5 а а minutes, and the slow poke takes 10 minutes to cross. аHow do the campers а а make it across in 17 minutes?а а а а а а аIf the probability of observing a car in 30 minutes on a highway is 0.95, а а what is the probability of observing a car in 10 minutes (assuming constant а а default probability)?а а а а аа а а а аIn a country in which people only want boys, every family continues to а а have children until they have a boy. if they have a girl, they have another а а child. if they have a boy, they stop. what is the proportion of boys to а а girls in the country?а а а а You have an empty room, and a group of people waiting outside the room. а а At each step, you may either get one person into the room, or get one out. а а Can you make subsequent steps, so that every possible combination of people а а is achieved exactly once?а а а а а а а а а аGoogle interview questions а а а а а The rectangle puzzle has a special case which does allow for an answer. а а If the rectangular removed piece is smaller than the cake, then the solution а а is to make a cut which joins the centre of the cake with the centre of the а а removed piece (if these centres are the same point, then any cut through а а this one point). However, if the removed piece is the whole cake, then there а а is no possible cut, since there is no cake. I wonder how many people figured а а this out (and I include the people who made up the question).а а а а а The last question about putting people in a room is the only one related а а to anything at Google. The solution is simply the Gray code, which is а а actually something of mild interest in Computer Science, and whose knowledge а а might actually be useful to future work at a computer company. The other а а questions are either silly, trivial if you know some math, or just wrong.а а а а а the 8 balls question answer isа а 1)take any 7balls from 8 and keep remaning asideа а 2)take any 6balls from that 7 keep remaing asideа а NOWа а CASE:1)а а weigh:1)3 and 3 of that 6 if equal thenа а weigh:2)that 1 and 1 from remaing finish.а а CASE:2)а а weigh:1)same 3 and 3 of that 6 if not equalа а weigh:2) 1 and 1 of that odd 3 finishа а а а а The ball question is silly because the algorithm works for up to 9 balls. а а In general, you can find the heavier ball in N weighings if there are at а а most 3^N balls, so using a non power of 3 misses the point. The general а а algorithm for 3^N balls is:а а Take 2 groups of 3^(N-1) balls. If they weigh the same, then the ball is а а in the 3rd group, and you can find the ball in a further N-1 steps by а а recursion. Otherwise, the ball is in the heavier group, and you can again а а find it in N-1 further steps by recursion.а а The adjustment for non powers of 3 is clear.а а This is probably the easiest coin problem. The harder ones don?t tell а а you if the coin is heavier or lighter.а а а а а You can also outwit the examiner in the clock quesiton. Normally the а а answer would be 22, but that is assuming that there are only hour and minute а а hands. However, you can outwit the examiner by making the formally correct а а statement ?most clocks have a second hand? and just wait there until he а а figures it out. Since this would obviously guarantee you wouldn?t get the а а job, I?m wondering if the real point of these questions is to make sure а а that you aren?t smarter than the people who made them up.а а а а а Anyone felt dumber reading Ilan?s responses?а а On the rectangular cake, don?t cut it from up to down. Cut across at а а mid-height.а а The point of asking ?83 balls is to lead people to think to weigh а а 4 with 4, 2 with 2, 1 with 1, etc. Weighing ?93 balls actually make а а the question easier.а а On the married couples question, use induction and start with the village а а having only 1 couple, then 2, and so on. Think in terms if you were the а а wife, and you cheated with someone?s husband, how would you deduce if your а а husband cheated and whether or not the other wife can deduce.а а а а а If you look at a clock and the time is 3:15, what is the angle between а а the hour and the minute hands?а а - Degrees per clock cycle or a circle: 360а а - Degrees per clock cycle Ticks: 360 / 60 (total minute ticks in a clock) = а а 6 degreesа а - Ticks between two hour digits: 5а а - Minute Hand Ticks per Hour Hand Movement: 60/5 = 12а а Using above data we can calculate the exact clock hands position & а а angle for 3:15 Time i.e.а а - Minute Hand position will be: 3а а - Change in Hour Hand position will be: (5/12) * 15 = 1.25 (exact ticks out а а of 5 hour ticks between two hour digits & this is also an exact ticks а а difference from minute hand)а а - So, ar there is (360/60) 6 degrees difference between two clock ticks а а hence thers is 1.25 * 6 = 7.50 exact degrees difference between minute & а а hour hands in 3:15 clock time :)а а а а а The answer to the bridge crossing questions:а а I will use following terms.а а camper1 - camper who can cross the bridge in 1 minuteа а camper2 - camper who can cross the bridge in 2 minuteа а camper5 - camper who can cross the bridge in 5 minuteа а camper10 - camper who can cross the bridge in 10 minuteа а 1. camper1 and camper2 crosses (2 min)а а 2. camper1 gets back (1 min)а а 3. camper5 and camper10 crosses (10 min)а а 4. camper2 gets back (2 min)а а 5. camper1 and camper2 crosses (2 min)а а Total 17 min.а а а а а To а а CSharp?s question:а а ?If you look at a clock and the time is 3:15, what is the angle between а а the hour and the minute hands??а а The way I thought it was (ends in same result as urs):а а The answer is that the hour hand moves 360 degrees in 12 hour. That is 30 а а degrees each hour - 7.5 degrees each quarter.а а Therefore the difference а а between the hands at 3 and warter is 7.5 degrees !а а а а а MIT Math Graduates Problem:-We know that 72?s factor are 2*2*2*3*3.Now а а we need to calculate all possible combinations of ages from those а а factors.The Combinations will be:-(2,4,9) and (2,6,6) and (2,3,12) and а а (3,3,8) and (3,6,4).For every combination the sum of ages will be (15) and а а (14) and (17) and (14) and (13) respectively.14 is the only digit which а а comes twice so that is the digit which is written on building that?s why а а first graduate couldn?t find out their correct ages.So possibly the ages а а should be (2,6,6) or (3,3,8).Now second graduate says that his oldest а а daughter just learned piano so this statement indicate that his oldest а а daughter is not twin so surely there ages will be 3 and 3 and 8.а а а а а The Restangular Cake solution:а а Whatever be the shape and size of the cut piece.а а Just cut the cake horizontally from mid of the height.а а thats all!а а а а а To explain the cake solution:а а 1) cutting a whole cake in half, in one strait cut, requires going from а а one side, through the center of the cake, to the other side (we can chose а а any angle we like).а а 2) cutting the empty part in half , using one strait cut, requires going а а from one side of the empty part, through the center of the empty part, to а а the other side of the empty part.а а - The solution requires both cutting the whole cake in half, and cutting а а the empty section in half, so we combine (1) and (2) to one striat cut а а through both centers.а а As explained by Ilan.а а а а а How many times a day a clock?s hands overlap?а а Only 11 times. Overlap exists on or after every hour except after а а 112 o clock.а а Srikanth Bethiа а а а а How many times a day a clock?s hands overlap?а а Above answer is incomplete?.in a it completes 2 rounds?in the round а а it gets 11 times and in the second round it gets only 10 times?а а so the total is 21 times in a dayа а а а а What gives you joy?а а Word ?YOU? is having letters ?Y? & ?O? and it requires а а letter ?J? to make ?JOY?. So the answer is ?J?.а а а а а Another way of looking at the 3:15 clock problem:а а Normally hour hand moves 1/12 of clock each hour.а а For 15 mins, it?s 1/4 of that then, or 1/48.а а Then 360 degrees / 48 = 7.5 degrees.а а Same answer, of course.а а а а а For the $20 trick question, i think i just figured it out.а а M = 20 + Tа а M + T = 21а а Substitute M: 20 + 2T = 21а а T = 0.5а а So, Todd has $0.50 and Mike has $20.50.а а Oh, and i didn?t use fractions in my answer.а а I used decimals.а а а а а probability of watching a car is .95 in 30 minа а it means probability of watching a car is 95% in 30 minа а probability of watching a car per minute is 95/30=1.9%а а probability of watching a car in 10 minute is 1.9* 10=19%а а а а а To Vimal а а Garg,а а Your answer to the three girls? age is right, but you can?t just а а verifying 72?s factor which is 2*2*2*3*3, because it is possible that the а а youngest daughter?s age is 1, for example: 1, 6, 12.а а The point to the question is that, there must be several combinations result а а in the same summary. Like 2+6+6 = 3+3+8 = 14. And there could be only one а а who has the oldest age, that is 8а а а а а To gaurav а а khatwani,а а your math is wrong in more than one spot.а а You can?t merely say probability of seeing a car in one minute is x and а а therefore in 10 minutes its 10*x. Probabilities don?t add up like that.а а Think of tossing a quarter. The probability of seeing a heads in 2 flips а а is 3/4 not 1/2 + 1/2.а а Solution (I think) is the probability of not seeing a car in 30 minutes а а is 05%.а а If the probability of not seeing a car in 10 minutes is x. then for each а а additional 10 minutes we multiply by x. so╟;D_D`D№·№Ўh╦╚Uh6Oх`D¤`D¤ x^3 = .05а а So the probability of seeing a car in 10 minutes is thus 1 - cuberoot(.05)а а а
,1Рh░╨/ ░р=!░"░#Ра$Ра%░░╨░╨Р╨ЖЬ@@ё @NormalCJ_HaJmH sH tH DA@Є бDDefault Paragraph FontRi@є │RTable NormalЎ4╓
l4╓aЎ(k@Ї ┴(No List'2 F )2I╚0А)2IИ0╨н`D`D`D жл┌ф^l9Cп┬╞222)27;йл▄ф gl├╞╝└ГЗ
389&2)23333333333Г&2)2хYР╦╚Ц▄6OхRЄ @А&2&2P╤&2&2L)*╟1'2Р@Р"РH@Р2Рh@РИ@ Unknown GРЗz А Times New Roman5РАSymbol3&РЗz А Arial"1ИЁ╨h┼%
З╞%
З|л*[|л*[!Ёа┤┤ББ422ЁHPЁ ?ф 6Oх2 UserXPUserXP■ рЕЯЄ∙OhлС+'│┘0TИРЬи╕─╘ фЁ
(4<DLфUserXPNormalUserXP2Microsoft Office Word@@&Uъsв═@ltв═|л*■ ╒═╒Ь.УЧ+,∙о0ьhpАИРШаи░╕
└═фPrive[2цTitle
!"#■ %&'()*+■ -./0123■ 56789:;■ ¤ >■ ■ ■ Root Entry └Fp╙Ftв═@А1Table $WordDocument .FSummaryInformation( ,DocumentSummaryInformation8 4CompObj q ■ ■
└FMicrosoft Office Word Document
MSWordDocWord.Document.8Ї9▓q