# Interview Questions in San Jose

interview questions shared by candidates

## Interview Questions in San Jose

What was my experience using project management tools and which ones? 1 AnswerI had used MS Project and even excel for many years, and could learn new project management packages fairly quickly. |

### Intern at Northwestern Mutual was asked...

What is it about this job that interests you? 1 AnswerMake sure you research the job description and are ready to speak to specific roles and responsibilities. |

How would you design a recommendation system (like amazon)? 2 AnswersUse collaborate filtering to compare personal preference with others. If A and B are similar, we can recommend preferred items in B to A. Why downvote on other answer? He/she is right. Collaborative filtering is the most common strategy for recommendation systems. You see user A buys these things and user B also bought those things but user B bought this other thing too so let's show that thing to User A. |

### Local Data Quality Evaluator at Google was asked...

How many cows are in Canada 101 AnswersIt depends......... Ask the folks at Department of ... whichever the department that already has this information. There is no need to start from scratch if this information is already available from a trustworthy source. But, if this department doesn't exist, then we can start by: - estimating the population of Canada - the number who drink cow milk and how much - the percentage of milk imported - the percentage of milk exported - the percentage of milk wasted - the percentage of milk used in other products - the amount of milk produced by a cow - from these numbers, get an estimate of the number of cows The approach should be as follows, please correct or improve the answer. 1. Estimate how much cow milk is produced in a day in Canada before it is processed and so on. A cow produces milk everyday except except for a time before it becomes pregnant with another calf. Read more: http://wiki.answers.com/Q/Does_a_cow_give_milk_every_day#ixzz2HiOmEXWc 2. Find out how much milk a cow produces per day on an average. 3. Divide #1 by #2 and you should have an answer. This is an approx answer. Show More Responses 111111111 if u hav doubt on it go and count it Let me Google it The number of cows is irrelevant, as long as each region in Canada has a high enough percentage of bovine to supply a stable flow of milk, cheese, ect. So by assuming cows are only used for milk production, the first two answers are already wrong. What about meat production? Less than the US. since the dept of agriculture does follow each registered cow, that number would be supplimented by the estimated number of non-registered cows. The number is variable dependant on time of year, supply and demand. Reproduction is cyclical, therefore the average would vary throughout the year. And so far as meat production, cattle are produced for meat, cows for dairy. 13.2 million according to WolframAlpha. :-) To which Cows do you refer? Are you strictly speaking about bovine cows, or do you also want to include Elk, Moose, etc? I don't know, however I am sure that if required to find this information I could. Zero. There are no 'cows' in 'canada'. Or I guess 0.25 since they share the letter c. Show More Responses http://dairyinfo.gc.ca/ says about 1.5 million dairy cows and heifers, and http://www.thecanadianencyclopedia.com/ says about 5 million beef animals. so, about 6.5 million head, for about 35 million Canadian humans. Send bunch of Google guys to count the cows. After that they will probably stop asking those questions. None - that I know personally Just as many as there need to be. Google it! Mooooooore than enough All of them. Count the number of cow legs and divide by 4 - duh. which variety, the four legged or two legged type? Utter ly ridiculous. Eat more chicken. Show More Responses I don't know, but if you hire me I'll find out for you. Define "cow." It depends on the day. Cow consumption varies greatly day by day. The only thing i can think to say is... it's an endlessly changing number. cows are born, cows die, cows are eaten, cows are cloned... at this very second there are cows in the process of doing all of those things, and there are cows simply going about their lives. there is no exact number. but there are a lot. Does this include only real, living cows, or are we also including stuffed animals? Statues? Milk and/or meat producing cows? Cows that can reproduce? Cows which have been sterilized? Are we including calves, or only those cows of a certain age or higher? This type of question is about identifying your thought processes...not providing an actual answer. Count the number of cow legs and divide by 3.999 (some small number of cows are maimed). There are 13 billion, 796 million, 463 thousand, 755 hundred, 74 cows in Canada as of 3 pm today. This does not incllude those butchered for consumption this evenings meal. This would also depend on how many people were ordering steak or beef of some kind. Then there are those who don't eat beef, they eat chickin, or fish or pork, or ribs, or those that eat pork chops, or those that just eat salad. So the number still lies in those research people who have to go count the number of legs on the cows, hence they need to not stand directly behind the cow or they will get on of two kinds of showers, I will get back to you on this. So, this is actually my original post after my interview with Google. There is no correct answer, they really want to see your thought process. The way I answered the question and I did get hired, was; "First I would have to know are we talking all cows or cows for producing dairy, or brown cows, female cows.....etc.?" My interviewer said, "All cows." I said, "Well first we have to know how many farms are in Canada. Then we could find out the maximum number of cows each farm is allowed to have and research with the dept. of Agriculture whether all of the registered farms are at maximum occupancy. We also have to take into consideration are their pregnant cows, and how many are slaughtered each month, thee has to be an allowance with that also." Anyway, I got hired at Google for the position listed above all to find out thta they were hiring shoe sales associates, and MAC makeup sales associates for this same position. LOL. Totally entry level. SKB and 13th we must have similar processors, lol, your answers are similar to how I responded!! I have'nt read the others yet, I'm making my way up the list. Its cool to see all of the different thought processes we all have. Show More Responses African or European cows? Over 9000 ! more than 1,00,000 n counting Forget the Cows! The U.S funding that I would love to have had control of is the $600,000 grant to study the effects of Rum on the citizens of the Dominican Republic. I figured it to be a 2 year study. $400,000 for my time, and $200,000 worth of rum for all of my newly snockered Dominican friends. Ciao, baby. Math.round(totalFarms / 4) == totalCows; Simple, count the number of cow legs in Canada and divide by four. "I was reading an article about this the other day. The latest official estimates are between 6.3 and 6.7 million cows. However, this figure is disputed by the independent Cow Quantities Authority in Qubec, who believe that the figure has been artificially inflated by up to 20% for political reasons. Most academics in Canada support the Cow Quantities Authority's suspicions, but not the scale of the alledged inflation." Okay, most everyone is over-thinking this. One poster got it right. How many "cows" in "Canada"? There are no cows in the word Canada therefore the answer would be no. If you look at the question as most everyone above has looked at it, you are over-thinking too much. Interviewers want to see how you think not how many real cows are in the country of Canada. Unless the company is involved with agriculture and cows. Here's a tip to get through an interview easier: go into the interview with the assumption that YOU are interviewing the INTERVIEWER. If they ask you weird questions, why? What is their thought process? Once you start seeing them as someone you question the interview goes a little easier. Try it, you'll see. British scientists found out that all cows in Canada are actually bulls. Google interviewers are not aware of that research and still counting Canadian cows. It could be 9,999. If someone does not believe it, can start counting. If it is found out more after counting, then the case would the visitors who come to visit relatives from neighbouring country; if it is less, then the case would be the cows from canada are visiting neibouring country to see their relatives or they could be eaten. Show More Responses One or less extra, depending whether your wife is Canadian. Duh. They are looking for you to say - I'd google it. Come on. My answer would be 3.5 million. The population of Canada is about 35 million. I surmise that there is probably one cow for every ten people. I doubt the interviewer cares if I know how many cows there are, but how to think it through to a possible answer with little to no information to go on. If we're looking at the colloquial term for a female bovine, there's many other species called cows: whales, manatees, giraffes, termites, crocodiles and alligators, bison and buffalo...and more. They probably just care that you don't make something up, but actually give it thought. Unlike Jerry... I would ask the interviewer "what is the purpose of asking this question and how is it related to the interview" As many as the young one of the cows....... According to BCG matrix in Management , product lines of an organisation which have high market share, low business growth and generates high profits and cash fall under cash cows category. So those organisations product portfolios in Canada comes under cash cows are the total no. of cows in Canada . More than 1 for sure and less than 10 million. For accurate estimation I would require to work on this project. X+1 Ask to google / search on google and you will defiantly get the right answer. Show More Responses more than one way to find out, here is one: -find out the annual number of slaughtered and exported cows that should be a close enough answer less than the total no.of cows in the remaining countries. In making the answer seem reasonable, keep in mind that Canada is not all that huge. Yes, the land mass is great, but the majority of it's population is much closer to the USA. Yes, they have farms, but don't they export much of their beef to the USA? Canada is a great grain producing country, so their beef/milk producing industry is self sustaining. Having said that, I would look at the interviewer and say, "If you are really interested in the details, and facts, just hire me for the job and i won't disappoint. " (with my new $150,000 salary, my company car, and a $50,000 yearly expense account, I would personally drive my way through Canada and visit every farm in that country. I would meet their families, and check out their daughters...............Lots of huge family farmlands, and great looking daughters to choose from?) During the 3 years, would look at my best opportunity, settle down and get married. We would have about 4 to 6 children, to keep her parents and us happy. My daily bonus check was marrying a girl who had the best milking hands in the county. After feeding the company all of the information that I had assembled, I would call them up and tell them that i quit. Mmmmmmmooooooooooooooo.................................. many two thousand hundred. knew this one. hew not for specific............ but cow not less than2 & more than 15000 There are 5768 cows, anything less means some have gone to the neighbouring areas and anything more means some have migrated into the region to meet their kin... can't comment cz without any given problem value it's nt easy to guess,,,,,,,,,,,,,, n it's also out of sylabus ,,,,,,,,,,,,,,,, "I don't know!" HALF THE DOUBLE Show More Responses 100% no 'cows' in 'canada'... first I thought of their competitors, milking the cows; but, when I looked at the job for which this question was asked, I understand how valid(ity) the question is.. may be not floats or fractions... nice people & machines are really working, I googled (as one reply says) I found wiki answer as, "about 7 million cows in Canada", I will be in trouble if it is 6.9Mn.... no interview question is a correct question and no answer is a wrong answer, when you are looking for leaders! There are 0 cows in Canada. The plural of cow is kine. 250000 cows More than 1, as the question itself says that there are more than 1 (cows). Candian women are all skinny. @Canadian guy. Many of the Canadian girls, within 25 miles of the USA border are on the slender side..............which is not bad in itself. Above that 25 mile zone, you will find the prize that you seem to be looking for. A good person to talk to, solid body, can deal with long winter weather, and a rather good cook. If you invest the time to know and appreciate her, your nights will never be lonely. As for your comment about Skinny Canadian girls? I was told by 2 Canadian girls, who worked in one of those border shops, that they prefer to go to the American side to have their fun and meet guys. They told me that the American guys like to have fun and they spend their money. What are you saving up for, Canadian guy? Is this the sort of projerct this position entails? If so, perhaps I should interview with a company that has a chance at remaining operational. The correct answer is "I don't know." They are testing to see whether you will make up a random answer, a wise-ass answer (no "cow" in the word "Canada"), refuse to accept that you don't know the answer, or waste time trying to find the answer to something you will never know (well, not accurately). Show More Responses They invented Wolfram Alpha for questions like these...13.2 Million haha nice try but I know in Canada there is only "caribous" and canadians. It is impossible to answer this question, and I will tell you why. On a daily basis, cows are being slaughtered and calves being born. Even if you asked me, How many cows were there on April 24th, 2013, at 3:47 p.m., there are still 60 seconds of time to consider, and faulty records from the farmers themselves. Now, on the other hand, if you asked me, "How many Canadian cows are named "Daisy", I would tell you there are 1,427. Then I would keep staring at your eyes until you blink. I love humor, and it makes life manageable. I just won't work for someone whose IQ matches that of Beavis and Butthead. If you tell how many grasses are there in America then i can exactly tell how many cows are there no of cows in canada are "no of cows in canada at thin moment"not or less by one. Possibly less than is needed, and probably not more than is wanted. Cows are not an invasive species. Over 1 moollion? It's like an eventual consistency problem in a distributed database. Every source will have a different number, and the real number fluctuates by the minute just from the millions of hamburgers that are produced daily in Canada. So, considering how accurate a number you need, and what point in time you need it for, you can aggregate data from many sources such as agricultural statistics, market prices, and futures prices and build a model, maybe using Bayesian Analysis, that will give you an estimate within a probability interval that is sufficient for your needs. Zero Quite a few I imagine, why? Show More Responses My initial guess is 4. But I'm not afraid to admit it when I'm wrong. 5 billion Submitting an answer 1 Uncounted I have bigger questions than this. 42 Probably less than there were yesterday I want Don't know Show More Responses 13.2M Cow In Canada According To WolframAlpha .... Vote 100 ~ So I Was Drunk Last Night I Got My Cat Put It In My Pillow And I Was Throwing Around Saying Its A Pillow Its A Pet Its A Pillow Pet XD... 13,200,000+ Cows In Canada According To The Internet ..... A lot six cows I will first state my assumptions. I assume there are 5 million cows in Canada. Then there are 5 million cows in Canada. Q.E.D. Hello, Thank you for sharing your interview experience. As a small team of ex-Google employees, we have recently launched a new website, interviewjoy.com, where you can earn money by sharing your interview experiences/insights with other job candidates. (It is a marketplace for sharing job interview insights). Posting an interview consultancy service is totally free & anonymous and we are giving 50 USD sign-up bonus for the first 500 users. You are kindly invited to interviewjoy.com to check it out. Users already started making money on the website! Best Regards.. (For more information: onboarding@interviewjoy.com) There is at least 1 cow and more... at every second possible. "including yourself ?" |

25 horses, 5 race tracks. How many races you have to run to select top 5 horses. 58 Answers7 Races First race all 25 in groups for 5 to figure out top 3 in each group. (15 left) Call them A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 Here A1 is faster than A2. A2 is faster than A3. The same applies for the rest of the groups. Now race A1, B1 C1 D1 E1 Lets say the order of the horses according to ranking was A1, B1,C1,D1,E1 So A1 is No 1 Now A1 is faster than B1 and B1 is faster than C1. So we can get rid of the entire D and E groups 9 horses remaining Also A1 is faster than B1 and B1 is faster than C1. So we can get rid of C2 and C3 7 horses remaining A1 is faster than B1. B1 is faster than B2. get rid of B3 6 horses remaining Out of these, We know A1 is the fastest. So now race A2, A3, B1,B2,C1 to figure out No2 and No3 positions One race is the answer Why 1? Show More Responses because, the top 5 are the fastest right ? so you run one race and take the best five times. It's a trick question to see if you'll make a mountain out of a mole hill. The first question to ask to clarify is: how many horses can fit in one track? Technically, one track can be used for all 25 horses, but this is too crowded for an efficient race. Let's say track size is not a factor, then, you need 1 race. Without overcomplicating things - the answer is 1 race. All other answers are based on dissecting the problem into, imo, unnecessary details. There is no mention of the capacity of each race track or number of gates available etc. Even if there are less than 25 gates available at a track, I'd say fetch enough number of gates so you can find the outcome with single race. This isn't a trick question. Normally this question has a track limit of 5 horses. I agree with Anuradha's answer. Anuradha's solution still has problems. (Even if we go with Anuradha's assumptions that you can only race one horse per track, and also assuming that we don't have a stopwatch and must compare horses placing positions) What if the fastest five horses are A1, B1, C1, D1, and E1 ? In Anuradha's second step, he elminates two of the fastest horses (D1 and E1) . He's assuming that A2, B2, or some of the other horses from the other heats are faster, but he hasn't actually tested to see if that is true. @anuradha: I think there are 2 problems: 1. How do you know A4 is not faster than B1 .... Suppose A1,A2,A3,A4,A5 are the fastest. 2. Using the logic posted we can get the answer in 6 races, 5 races for finding A1,B1,C1,D1,E1 and 1 race to find the ranking. Assuming 1 track for 1 horse then it need 5 races to select top 5 horses. Each race for 5 horses and count the time for each race. The top 5 fastest horses are the top 5 horses. 2 max: top 4 from first race, if 5th is a tie, then two, or else just one. 5 6 Show More Responses You guys are not doing CS! 10 runs is my answer. 1. randomize 5 groups, each of 5 horses 2. rank them within each group, I will use Anuradha's notation (5 races) 3. pick the best of each group, race to figure the 1st place, call it A1 (1 race) It should be clear, it wins all times, every one lost once. 4. remove it. substitute 2nd best in. repeat 3 (in my eg. A2,B1,C1,D1,E1) now you have second place. keep going, you get the first 5 and ranking! So, 5+5=10 races in total. The answer is 9. Assuming: - There's no time measuring (stopwatch), just relative places. - The horses perform consistently. - A maximum of 5 horses per race. First we need 5 races (A to E) to get relative scores for all 25 horses. Let's take a worst scenario: the list was already ordered (A1 fastest and E5 slowest), so race A contained the top 5. The 6th race would be the winners of the 5 races (A1, B1, C1, D1, E1), and would give A1 as the fastest of all. This would also mean that some horses can be excluded (only 4 more places to fill): B5 C4, C5 D3, D4, D5 E2, E3, E4, E5 For the 7th race, A2 would replace A1, and A2 would be appointed as the runner-up (of all). We also can exclude some more (only 3 more places to fill): B4 C3 D2 E1 For the 8th race, A3 would replace A2, but as E1 has been excluded, we got a vacancy. Let's add C2 for worst case scenario. The winner would be A3, and we can exclude more horses (only 2 more places to fill): B3 C2 D1 At this point there're only 5 horses who have not yet been classified or excluded, so the winner and runner-up of the 9th race would give 4th and 5th overall. To Patrick: I had to slightly modify your almost correct solution and got 10 races. You has an excellent idea to remove subset of candidates after final selection of the i-th horse, and my modifications are not an essential ones. Actually it is necessary to fix two small things: 1. get rid off the suggestion about the ordered list To avoid this suggestion I would rename groups from the fastest A to the slowest E with order by 1st horse after final selection of the i-th horse. So after race #6 we have order: A1, B1, C1, D1, E1, but there is no suggestion that all A are better than all B and so on. And after every race #7, #8, #9 we have to rename groups. With this modification your method works fine until final selection of horse #5 2. Without this suggestion you need race #10 to find the last 5th horse. To test both methods you may use 25 randomly selected integers and select the 5 minimal or maximum ones. I can't prove that 10 is the minimum number of required tests, but it looks very convincing. Thank you. Maybe Ziqi Dai also meant the same method, but it was difficult to understand without a couple of details. To Leo, I checked some random sequences with a spreadsheet, and all the remaining (not placed or excluded) horses run in the 9th race, so there's no need for a 10th race. Sometimes there're only 4 or even 3 horses left in the 9th race. I didn't check every possibility, but there was no indication a 10th was ever necessary. This answer is 1 regardless of track. If it can fit all 25 then you only need one race. If you make the assumption that only 5 can race at a time then you put 5 on each track and start the race on each track at the same time. Either way, the fastest 5 horses win. Using complex math on this is pointless since a pragmatic approach is available. @ Anuradha -- this is a great solution to the wrong problem! The classic problem is to find the THREE fastest, and that's what your solution is. However, the question posed in this thread is (likely incorrectly quoted from the interview) to find the FIVE fastest of the group. why would you make an assumption that makes this more difficult? I mean given this is an IQ test of sorts, making it harder than stated is........ Attention to details, Anuradha! You're answer would've been correct had the question asked for top 3 horses. This is like merge sort. In the first 5 races (when we run 5 horses per race) we get 5 sorted sublists. Each sub-list contains 5 horses sorted by their relative speeds within that sub-list. Now just merge these 5 sorted sublists to get your answer. Every "merge" means 1 race to find the fastest horse from the front of these 5 sorted sublists. To summarize: 1. Creating 5 sorted sublists of 5 horses each = 5 races 2. Getting fastest horse = 1st round of merge = 1 race 3. Getting second horse = 2nd round of merge = 1 more race 4. and so on... Show More Responses Why is this harder than having five races with five horses, recording the times of each horse, and sorting the list of observed values to get the top 3? it is seven race 7 full explanation; http://www.programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle/ 1 For 3 fastest horses no doubt the answer is 7 but for 5 fastest I worked it out to be 9. And pretty sure too 1 only if you can do good flow control and horse will start with different time / space out based on best estimate. It is kind of feeding the horse to the gate. Simply 5 races only, i.e. 5 horses in 5 race tracks per race. Finally, select top 5 horses by best fastest timing at finish line after 5 races. As a BA, the answer I would give is: We don't yet have enough information to provide a solution. There is critical information missing that could affect the solution. And flushing out all the critical factors of the problem are one of the most important responsibilities of the BA. As a BA, it is very important to NOT start building solutions to problems that you don't yet fully understand. Actually, it's one of the biggest mistakes inexperienced BAs make: solving the wrong problem because they rushed to solutions and did not fully investigate and understand the problem! Once they're committed to the wrong problem, they end up with a beautifully done inadequate solution. 5 races, because you can fit 5 horses in 1 race and there are 25 horses. You just note the timings of each horse and compare them after all the races are done. That way, you won't have to arrange more than 5 races and stopwatch is a common tool for every phone!!! First of all guys, you guys are making critical mistakes. You assume we have a timer but that would make it too easy, right? I'm just assuming that 5 horses a track and no timer. So I have two potential solutions: 1. You could always just race them all at the same time on 5 tracks...but that'll be too easy. Then there's my solution: --------------------------------------- First, group all the horses into five groups of five. It doesn't matter which horse goes into which group, it honestly doesn't matter. Then, race all the horse in one groups against each other. It helps to name them A-E(Group name) and the number place they came in (ex: 1st place a group would be A1). So now we have A1 to A5 and B1 to B5 and so on until E5. Then race all the 1s against each other. You should get something like A1, C1, B1, E1, D1 and then you should arrange their groups in collumns from left to right based on that race (1st on left, 5th on right). Here is where it starts getting complicated, so I will just assume it is A1 fastest in that race and E1 slowest and so on just for simplicity. So so far this is 6 races. Get E1 and race them against D2-5. You can ignore E2-5 because no matter what they can never be in the top 5 because A1, B1, C1, and D1 is the fastest of their groups and you know that the fastest five can come from those groups but not E2-5 because E1 is the slowest of the 1's and there's no way those horses can be in the top five. SO just throw them away. Since there are four spots available max you race the slowest four of the D which happens to be D2-5. Get the place numbers and arrange them. EX: D1 D2 E1 D3 D4 --- D5 E1 can be anywhere based on E1's speed but you immediately want to discard the D5. You might be saying, "Hey, why can't we discard anything below D2 since A1 and B1 and C1 are all faster than D1 and E1?" But...you could be unlucky and have A2-5 and B2-5 and C2-5 be all dirt slow. So just keep them for now. So the rule now is to keep all the horses that are in the top 5 and discard the rest until you get to A, when you know, "Oh, A1 has to be the fastest horse." 7 races. So we have our list above just for examples. Next you want to race D4 against C5 to see if our group can EVEN pass the C's, cause we might get super unlucky and see that C1-5 is faster than D1...if D4 loses in 5th place we just throw this all away and our new list becomes: C1 C2 C3 C4 C5 But otherwise we'll just assume that our D4 luckily got to 3rd place. It becomes: C1 - Our group can go anywhere inside the lines so race them again C2 minus D4 since its in 3rd place to see where they go. Let's assume we got SUPER lucky and C2 became last place in that race. - C3 C4 C5 8 races. We raced this group at that time and left out D4 because D4's fate was already decided: D1 D2 E1 D3 C2 It turnes into this: C1 - D1 D2 The single dash indicates where our new group was spliced, ofc the triple E1 dash lines show where the cutoff is, so discard everything under the line. D3 -(---) C2 D4 C5 9 races. Kay, so now we have the five fastest in the E, D, and C groups. Now continue with the B groups and let's say that our D3 passed B4 only... It becomes: B1 B2 - With our top five so far group racing against B4 B3 - D3 B4 B5 10 races. And then with another race you get this with lets say...only our top two making it through with B3 getting ironically first place: B1 B2 B3 C1 D1 --- D2 E1 Yep...E1 got kicked out. Aw well. SO NOW our to group D3 is the group above the triple dash marks. B4 B5 11 races. Now we're up against the A group. Assume that they are all wusses and that our D2 beat all of them except for A1. So we got lucky and the new lineup is this: A1 B1 B2 B3 C1 --- It was inevitable that A1 would become first but now this is how you do it! D1 D2 A2 A3 A4 A5 12 races/13 if our B1 didn't beat all of the other A's on the first try. Conclusion: 5 races (initial races)+1 race(for initial group leader ranking)+1 races(E-->D)+2 races(D-->C)+2 races(C-->B)+2 races(B-->A) =13 races/10 races if you get insanely lucky and have all our previous groups beat all the #2s of the groups. Show More Responses Oh nvm ignore that it was all crushed into one place with no spaces...I'll stick a better one later. The answer is 8 races assuming that you can fit only one horse on one track. Divide the group into 5 horses. In five races we can find the 5 fastest horses in the 5 groups. The 6th race is among the top 5 fastest horses. The top three fastest horses in the 6th race are faster than the horses in the group of the 4th and the 5th fastest horse. The horse that came third in the 6th race may or may not be faster that the horses in the group of the fastest and the send fastest horse. To determine that, we hold 2 more races. So 6+2 = 8 races is what I think is the correct answer ****************ANSWER -- 3 RACES.************* Given : 25 horses, 5 tracks Assuming : 5 horses to a track Five groups of 5 horses for each track (5 tracks, tracks ABCDE, each track with horses labeled "X#") First race allows you to find out the top 5 horses (however this isnt the true top 5) [A1,B1,C1,D1,E1] Second race the top horse is discovered (lets say its A1) Now you have to find out if B1 is better than A2, B2 is better than C1, etc. (each predecessor of each winner) We know that B1 is better than [(CDE)1] Third race we have A2,B1,B2,C1,D1 Conclusion : If both of the predecessors are NOT last place, then we have our answer at race 3 by taking the top 4 to be the bottom 4 of the top 5. Otherwise, repeat this process one more time to find the 5th placed horse. Ans is 14 Patrick gets the right number but his logic is not the most efficient. Initially follow the standard procedure and race 5 groups of 5 (races 1-5) and then race the winners (race 6). The winner is the fastest overall. Now name the groups with the horses in the winners group A1,A2,A3,A4,A5, the first four horses in the runner-ups group B2,B3,B4,B5, the first three horses in the third group C3, C4, C5 down to E5 for the winning horse from the slowest group. The numbers indicate the highest possible position a horse could attain (i.e. C4 is definitely slower than C3, B2 and A1 but may be slower than several others). The rest of the horses are eliminated and so don't need to be labeled. Now race (race 7) the horses labeled 2 or 3 (there are 5 - A2,A3, B2, B3, C3) The top two are second and third overall and the loser is eliminated. You can eliminate a total of 5 or 6 horses - those known to be slower than the fourth or fifth place finisher and any two positions slower than the third place finisher in race 7. There aren't that many options here so you can just inventory all the possibilities if you wish. At this point you have a maximum of 7 horses for the remaining two positions You just race any 5 (race 8) to eliminate at least 3 and race the rest (race 9) to get the fourth and fifth fastest overall. If you choose all the potential fourth place finishers in race you may not need race 9. As noted elsewhere Anuradha gets the right answer to a different question than the one asked. I have stepped among a lot of smart folks here. Maybe even several analyst's. So here it goes. I am looking at this as who the question is coming from and for what. A Business Operations Analyst for Google. Everyone is so focused on answering the question based on assumptions. Ie. That every horse and rider are at their best condition and that every track is exactly the same. That you are running all the races in the same day and that horses, riders, and tracks dont change. Horses and riders get tired, not to mention the possibility of injuries, and track conditions can change so forth and so on. So to me. In order to (analyze) to get the best possible answer. I would start by asking questions and not assuming. The more information you have leads to the best possible answer. Guys think as a programmer, (mind my language and grammar) algorithm would be of these steps ->group the horses (5 horses each) -> get the best runner of each group (five races) -> store the horses in winning orders to five stacks (a,b,c,d,e) ->until the top 5 are found, repeat ->race all the 5 on top of the stack ->pop the winner from its stack and store in top five that all, now lets see how it will work. lets have 5 horses per group and group them as a,b,c,d,e. 1=a1 a2 a3 a4 a5 a1 (winner) 2=b1 b2 b3 b4 b5 b1 3=c1 c2 c3 c4 c5 c1 4=d1 d2 d3 d4 d5 d1 5=e1 e2 e3 e4 e5 e1 now we have best of each group, let them race 6=a1 b1 c1 d1 e1 a1 for every winner get the best candidate for the group, and race again, until top 5 are found 7=a2 b1 c1 d1 e1 a2 8=a3 b1 c1 d1 e1 a3 9=a4 b1 c1 d1 e1 a4 10.a5 b1 c1 d1 e1 a5 for any scenario just get the so the ten races. its like finding five highest numbers from 25 numbers, when you can only compare 5 at a time. Answer- 7 Races Give names H1....H25 Divide into 5 groups as 5 can run at a time H1, H6 , H11, H16, H21 are fastest in there groups Now we can remove last two from each groups as we need fastest 3 now we left with 15 horses 6th Race- between all fastest in groups After 6th Race H1> H6 > H11> H16,>H21 Now H21 was fastest in group but is 5th in 6th race so H22 and H23 who already slower than H21 can't be in first 3 Same thing applied for H17 and H18 as H16 was fastest in group race but 4th in 6th race Same applied for H12 and H13 as H11 was fastest in group race but 3rd in 6th race Already three horses are faster than H16 and H21 so they both also can be rules out Now we left with H1, H2, H3,H6, H7, H8 and H11 But H8 is slower than H7 and H7 is slower than H6 in group race and we have H1 on top already so H8 also can't be in fastest 3 Now we left with H1, H2, H3,H6, H7, H11 H1 we know is fastest..so lets 7th race between H2, H3, H6, H7 and H11 and find the other two After 7th race you will get fastest 3 Make a group of 5 horses per track and race them all at once. The winners of each track totals to "the top 5" ! The answer is 7. Assuming: - There's no time measuring (stopwatch), just relative places. - The horses perform consistently. - A maximum of 5 horses per race. Race r1: A1 A2 A3 A4 A5 (By order of winners) Race r2: B1 B2 B3 B4 B5 Race r3: C1 C2 C3 C4 C5 Race r4: D1 D2 D3 D4 D5 Race r5: E1 E2 E3 E4 E5 Race r6: A1 B1 C1 D1 E1 (rename R1 R2 R3 R4 R5) Here comes the tricky race. From race 6, we already know the ranks. As a demonstration, assume R1 = A1, R2 = B1, R3 = C1, R4 = D1, R5 = E1. Then: 1) D1 D2 D3 D4 D5, E1 E2 E3 E4 E5 are out of the contest. Because D1 and E1 are ranked 4th and 5th in a race. 2) C2 C3 C4 C5 are out of the contest. Because two horses already are faster than C1 ==> 3 horses are already faster than C2 C3 C4 C5. 3) B3 B4 B5 are out of the contest. Because one horse already faster than B1 ==> 3 horses already faster than B3 B4 B5. Remaining potential horses are: A1 A2 A3 B1 B2 C1. Here, A1 is redundant because we already know it is fastest. Race 7: A2 A3 B1 B2 C1. The top 2 will be added to A1 to be the fastest three. Show More Responses Take a look at previous horse race statistics from horse newspapers. Make your analytic and you have your top 5 horses without any new race :) It will take min 9 race not 7: first five race and find top 3 @ every slot now total race=5; one race between first five, now we find top 3 and take 2nd and 3rd from the race as 1st is declared. race=1; 1 race between 2nd finisher of all slot and take 2 from them , race=1; 1 race between 3rd finisher of all slot and take top finisher, race=1; now we have race between 5 horses(2+2+1) and find 2nd and 3rd; so total no of races= 5+1+1+1+1=9 ; I have grouped them in 5 groups. See the groups below. I have also ranked them in the order of the wins. So for e.g. in the first group, 1st horse came first, 2nd horse came second and so on In the second group 6th horse came first, 7th horse came second and so on. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 After the first five races, there will be two more races So the sixth race will be among the horses below (who were first in the previous races) and I have ranked them in the same order in the 6th race 1 6 11 16 21 - - So 1st horse came first, 6th horse came second and so on. Now for the 7th race, we will take the winner of the 5th race and make him compete against the first four winners of the 6 the race. So it will be something like this and I ranked them in the same order for the 7th race. 1 6 11 16 26 - So from 7 races it will is very clear that the fastest four horses are 1 6 11 16. Now, only 21 and 26 are the contenders for the fifth position, based on their timings in their respective races (6th and 7th ones), we can decide which one is faster between the two. So in total , we would need 7 races. The question is not a good one! Let those horses be marked X1~X25. First divide them into 5 groups X1~X5, X6~X10, .... Assume the first X1, X6, X11, X16, X21 are the fast ones in each group after the first round. Also, X2 > X3, X6>X7, during the first round. We then, during the 2nd round, form the first group with those fastest from each group in the first round. Assuming that X1 > X6 > X11 > X16 > X21 after the first try of the 2nd round, we will then have X2, X3, X6, X7, X11 to form a new group and determine which are fastest 2 in this new group. Nevertheless, during the 2nd try of 2nd round, it can happen that X3 > X2 or X11 > X6. The inference fails all the relation set in the previous try. ( that the X2 > X3 ,after the first round, and X6 > X11, after the first try of 2nd round). It would be better to change all those horses to be boxes carrying different integer value. You want to sort those boxes to find which carrying the largest 3 numbers and, at any time, you can only open 5 boxes to inspect . You cannot mark the content of boxes but you can put down the relation between boxes during the inspection. Then, the number of inspections needed to find boxes with the largest 3 number will be 7# This seems like a simple answer, but I'm pretty sure it's 9. Race 5 groups of 5, then race all the 3rd place, then the winning 3rd races the seconds, then you have either have five firsts and two seconds left or 5 firsts a second and a third left from the original racing groups. Worst case scenario you have one more race of three ones and two twos or two ones and the 2nd and third place to find the fastest there out of that last group. 9 races. So driving down the road I figured out I should have started from the top after the first five races. Then worst case scenario you run three more races to find out the top three. 11111, 21111, 31111. Damn. Six races, six groups. First group will have five horses, the 5 others groups will have only 4 horses. The winner of the first group of 5 horses will pass to the second race, then the winner of the second race will pass to the third race and so on, bay the end of the 6 race you will have top 5 horses. 25 horses, 5 race tracks. How many races you have to run to select top 5 horses. Solution: http://codinginterviewquestionsans.blogspot.in/2017/07/25-horses-5-tracks-5-fastest-horses.html Step 1: First, we group the horses into groups of 5 and race each group in the race course. This gives us 5 races. W11 W12 W13 W14 W15 W21 W22 W23 W24 W25 W31 W32 W33 W34 W35 W41 W42 W43 W44 W45 W51 W52 W53 W54 W55 Step 2:we race the 5 level 1 winners(w11,w21,w31,w41,w51) and assume winning order of this race is w11,w21,w31,w41,w51 (THIS IS 6TH RACE) Step 3: BECAUSE WE NEED TOP 5 AND W51 HAS COME 5TH Position that is the reason we don't need to consider W52 W53 W54 W55 now we have W11 W12 W13 W14 W15 W21 W22 W23 W24 W25 W31 W32 W33 W34 W35 W41 W42 W43 W44 W45 W51 Step 4: because we need top 5 then dont need W25 W34 W35 W43 W44 W45 now we have W11 W12 W13 W14 W15 W21 W22 W23 W24 W31 W32 W33 W41 W42 W51 Step 5: top 1 is already achieved which is W11(winner of 6th race) remaining are X W12 W13 W14 W15 W21 W22 W23 W24 W31 W32 W33 W41 W42 W51 Step 6: candidates for 5th position: W51 W42 W33 W24 W15. 1 RACE TO GET 5TH POSITION (this is 7th race) remaining are X W12 W13 W14 W21 W22 W23 W31 W32 W41 Step 7: candidates for 4th position: W41 W32 W23 W14. 1 race to get 4th position ((this is 8th race) X W12 W13 W21 W22 W31 Step 8: candidates for 2nd and 3rd position: W12 W13 W21 W22 W31. 1 race to get 2nd and 3rd position ((this is 9th race) Hence answer is 9 races. Assuming no limit to how many horses on a track, 1, because the fastest 5 will obviously finish in 1st, second, third, fourth, and fifth place. If there is a limit to the number of horses on a track, then it will take (25/number of horses to a track) rounded up to the next integer races because you can just compare the times of all of the horses and pick out the five fastest times. There are a lot of wrong answers on here or answers for different questions. Answer for top 5 is 8 races. You can find explanations online for this. Show More Responses Friends only 5 races are required As mentioned we have 5 tracks and 25 horses. So divide them into set of 5 And winner of each set is fastest so only 5 races are required. 18 If there in no limit on track one race is enough. But if 5 horses can run at a time we need 6 races. 5 races to find top of each group. And additional 1 race among those top 5 horses to find out top 3. answer is 8 suppose we have limit of 5 horses per track and all horses run together on 5 track so *-5 races-* conducting on five track, the top one of each track is selected for further race and now race is conducting between the all top 5 horses which is *-6th race-* and the remaining 4 horses will race again for 2nd and 3rd position hence total no. of race are 5(all five races)+1(6th race)+1(7th race)+1(8th race). So many wrong answers here, first of all the question is about FIVE fastest horses, not three, so all the posts giving 7 as an answer are wrong. All the answers above 9 are also wrong. You need 7 races to find 3 fastest horses, after that by using logic you come down to either 6 or 7 remaining horses as candidates for places 4-5, and you need 2 races to figure out which 2 of them are the fastest. So it's 9 races in total. |

### Vendor Relations Manager at Google was asked...

How many people using facebook in San Francisco at 2:30pm on a Friday? 50 AnswersDepends which year, particularly if you are asking about any Friday prior to 2005, for example. In general, the question is unanswerable, since anyone using the internet, in any application whatsoever, is "using" Facebook, which also contributes data and information to the internet. If you are striving to determine how many people are actually "on" FB at 2:30pm on a Friday, I would venture a guess that perhaps 10% of the population is actually on-line on FB at that time. Interesting question, but the parameters are rather indeterminate. About 60 percent of adults (18+) Americans have a Facebook account. But we're talking San Francisco here--the Valhalla of Nerdery and all things internet--so lets bump that up to 80 percent (this 30 percent increase is justified by the fact that SF is 30 percent geekier than anywhere else...). For purposes of the question, let's limit this explicitly to the city of San Francisco--not the entire Bay Area. At night, SF is about 800,000 people strong. Let's assume a little over 20 percent of that population is either too old or young to use Facebook (it would be higher if mothers hadn't taken off FB...). Let's say that leaves 600,000 people (note: working with round numbers is better for these sorts of things). But then we have to take into account the fact people commute to and from SF! Nerds pour out into the South Bay, suits (e.g., bankers) come in from the East. I suspect the city population swells by 50 percent. If we toss in tourists and conference goers and everything else, 1 million people are in San Francisco at 2:30pm on a Friday. Eighty percent of those people use Facebook, so we have 800,000 possible Facebook users at that time. The final step is to figure out what percent of the 800,000 are using Facebook at 2:30pm. It's later in the day so I suspect it will be higher than at 11:00am. But I don't really have a good baseline to judge. When I walk around my office, roughly 10 to 20 percent of screens I see as around the office are on some non-work related thing at any time. Let's call that 15 percent and assume that all non-work related surfing by FB users includes some sort of use of FB. That means 120,000 people are using FB at 2:30pm on Friday in San Francisco. This is good feedback, but i'd also be curious to know why Facebook and not Google +? Show More Responses "How many people on facebook...." 4, 573, 210. Prove me wrong. To Barney, the population of SF is only about 800,000. All of them. Facebook's corporate HQ is in Menlo Park, a suburb of San Francisco. So, anyone using Facebook is using "Facebook in San Francisco". Let me google that for you. If the answer isn't readily available, I'll E-mail someone at facebook analytics. No one will surmise a closer answer. Let's Ask Jeeves. Answer?... more than are using Google+ I think that there can only be one motive behind asking such a stupendous question, i.e., to see your thought process, and to see your assumptions behind your guesses, how deeply did you think about the problem, how many dimensions did you look at, before formulating a 'plan'? Such questions are best tackled by doing a quick internal-brainstorm session while thinking aloud~so that your interviewer also gets a glimpse of your inner-mind's working. In this respect, i think that GBAD has done a good job of making his/her assumptions clearer than the rest of us. Too many. Aditya is correct, although fascinating how many ppl show their lack of problem solving, including GBAD. Extra bonus points for Tim's answer, because he probably answered the question that created the question in real life. "The final step is to figure out what percent of the 800,000 are using Facebook at 2:30pm" Actually no, you already said that was the night population of SF, so therefore you're basis is way off. Many more people work in SF during the day than live at night, so toss the 800k figure out to start. And Daniel Gullo, decent answer, but the question didn't ask what percentage of users were in SF. That's what you answered. So... let's see. I'd guess there to be around 1.5m people in SF on a random Friday @ 2:30, maybe 10% of which are actually on FB. Easy as pie answer of 150,000. Correct or not, the logic is strong, and that's the point. God, Is that really strong logic? Where did you get the 10%? I would think that at 2:30 on a Friday more than 10% of the working population have Friday-itis and are surfing facebook to plan their weekend Show More Responses A; Who cares I'm not one of them! I'm still at work! The answer is-- The number of people on Facebook in SF minus the number of people not using Facebook at 2:30 that Friday @God, Daniel answered the question in a clever way, but somehow you missed it, despite your all-seeing nature. He simply read the question with a different emphasis: How many people using *facebook in San Francisco* at 2:30pm on a Friday? rather than *How many people using facebook* in San Francisco at 2:30pm on a Friday? I would have been inclined to ask a "qualifying question" - What problem are you trying to solve? If as I suspect Tim's presumption is correct, perhaps the interviewer would have admitted it and then you could offer your expertise in correcting that condition. there is no right or wrong way to approach the answer to this question. There is also no right or wrong answer. They only want to see what logic you are using to come up with the number. It is a similar question that I believ Microsoft, it could be Google though, asks when asking how much would you charge to wash all the windows in Seattle. you can multiple and divide and subtract and add the population by the work force, avg height of the building, and come up with a number, or yo can simly say 10 bucks a window. I compare these oddball questions to the Men in Black Scene where J is trying out against the "best of the best"......these companies are trying to find the out of the box thinkers. Many seem to use their education, assumptions, statistics, logic, and deduction to come up with the answers. Answering the question is the first mistake most interviewee's are making. I think these big companies would probably hire Tim first over GBAD. Why Tims? There's no way Google could argue nor find flaw in that statement. They know where Google+ stands, and they can't disprove that as false. Whereas GBAD, they'll probably start questioning him on where he came up with the stats. It's not about the right answers, it's about how they can prove you wrong. So don't let them prove you wrong. More than the amount of people who know about Google Wave. @AL: you're right to point out that these questions can be used to assess creativity. but more often than not, when asked by a big company like google or any of the consultancies, they want an answer. they want to see how you make assumptions--even if the final number if way off. if you can sprinkle in some creative bits, that helps. but you typically need a number at the end. All of them. Meaning people. Who else would be accessing Facebook in the first place, a dog, cat, squirrel? It's like the question asked when passing a cemetery...How many people are buried there?...Silly fools. All of them. LOL. All of them. Melissa is right, oldest most logical answer out there. Show More Responses Will go with Melissa on this as most people are offering answers to the question "How many people are using facebook" instead of "How many people using facebook". Simply put many people. Are we talking about people that live in SF as well as people born there that live elsewhere? Is this including people on planes travelling elsewhere on facebook? For how long does the user have to be on facebook to be included? 2 guards......one holds the door to life and freedom, the other death. You can ask one question to one guard. What question do you ask? Well, Siri didn't know. Me: None Interviewer: How could you ever know that? Me: San Francisco is far too techsavy to use such an outdated technology, they're on google+ GBAD's approach is correct. This type of interview question is referred to as a brain teaser. Most of the large management consulting firms throw these types of questions at you, along with business cases that require you to compute numbers and rationalize your way to a solution. The interviewer is not interested in the answer you come up with here. He is interested in the thought process and your analytical problem-solving skills used to find an answer. A similar question used is: "How many ping pong balls would fit in the body of a Boeing 777?" Yet another: "How many boxes of Count Chocula cereal were sold in the United States last year?" They don't want you to respond by saying you'd look at the sales figures from General Mills. They want you to come up with something on your own. They want to see your methodology. These types of questions separate the best from the best. If you'd like more information on these types of interviews, Google "McKinsey consulting interview questions." ANS: I don't know. May be if facebook uses google analytics, then that can help! I would ask in return, Can you tell me a little bit about how the answer will be utiliized . Data is data but depending upon how it will be used, depends on the answer. Turn it around for just long enough to allow the interviewer a chance to show off while you come up with a valid answer. And because you will not have your computer available use the above advice and give a generic answer about how you would progress to acquire this information. Certainly they most probably do not care what the technical answer is, they want to knowcan you process problems and create solutions. equal to the no. of gmail users.... This is where you show off your technique rather than your memorized set of facts. The interviewer is interested in your powers of deduction as well as your prowess in planning an estimate. First of all, it is necessary to define the term "using". Possible definitions include: have an active session with; exchanging data with; displaying the website in some viewer; etc. Someone having the right kind of network access, assuming you could contact her, would be able to count the number of active sessions, but this would return a count of endpoints rather than of "people". Further refinement necessary. Given the number of variables and the uncertainty in each, the crucial part of the answer will be to pin down a confidence interval. After reading though the list of questions and answers I offered the following observation on the Tesla question and am repeating it here on the first question: These questions (all 25) on the most part seem to be using the psychological projective test technique. In projective tests the questions are designed to be ambiguous. It's like looking at an inkblot and telling me what you see. Because it's random with no clear answer, you have no choice but to “project” your personality, thoughts and feelings in the answer. Thus revealing something about yourself that the interviewer may find useful and hopefully job related. For example, those of you who obsess over the technical details or those of you who offer a glib response or those of you who ask why is the question relevant. These answers all attest to an aspect of your personality. That said, while I like the idea of projective tests I suspect that these questions are mostly amateurish attempts at projective tests that have not been validated or shown to be job related- I would be surprised (if not heartened) if otherwise. Show More Responses hold on... let me google it from my android phone... Thanks GBAD and MM. I am actually preparing myself for a consulting position and have done tons of preparations. That is the way such a question should be approached. As MM mentioned the interviewer is "interested in the thought process and your analytical problem-solving skills''. It is not a tricky question, and at the end, they want a NUMBER. MM has provided the most in depth analysis. Paul's answer is amazing....as an ice-breaker, than...comes GBAD's. Correction: GBAD has provided the best analysis. Florin - Remember that people hire people that they feel reinforce their values and sensibilities. In the consulting field they call this mirroring - you mirror the values, etc., of the client. Mirroring works great for client engagements. They may be assessing your fit with the company with a the "brain teaser" but I find it unlikely that all they are interested in is you cold analytical abilities in figuring out an absurd question. Analysis may be part of the puzzle but it will also be in how you respond to them as people, how you make your argumment - in short - are you one of them and will you fit? The moral to this whole story will be simple and is something you've known all along (your mom and dad probably told you this) , be yourself. If you don't fit, the job will not work out for you in the long run anyway for a lot or reasons including because you won't be happy there because, well, you don't fit. So be yourself and be CONFIDENT in who you are. If the fit is there you've hit a homerun. If not, it's just a job. At that point I would ask if anybody with half a brain would like to talk to me or should I just leave? what's facebook ? ;) Seems like a Fermi question isn't it? http://en.wikipedia.org/wiki/Fermi_problem The answer should revolve around the actual position your are applying for. For instance, TNT's response to qualify the question would be a great answer for a sales position. GBAD a statistician or someone involved in marketing research. Always answer a question in which is applicable to the job. THERE IS NO CORRECT ANSWER. However I did think whoever said "everyone, because facebooks headquarters is in San Francisco" is a clever enough answer for any position. I will also say that ultimately the idea is to see how you handle the question, which is applicable in any position. If you don't answer with confidence, no matter what you think, I wouldn't be excited to hire you. Its questions like these force me to be self-employed. I have a low tolerance for mind games. I would answer this question with a statement. I don't know the answer. Can you tell me why this information is important to you and how it pertains to the position I am interviewing for? The I would wait for their answer, and respond to that. . Comparatively less than the people using google @ d same time (keeping in mind that the question was asked by google for the post of VENDOR RELATIONS MANAGER). Show More Responses Isn't the interview question incomplete or grammatically incorrect? Plus or Minus 10% that were using it at 2:29:59. Except on the Friday with the earthquake. If the interviewer asks which was that Friday then you tell him :"Please you answer that because I want to see the caliber of the people that I will work with assuming I will accept your offer." given its a friday and its already 2:30 pm.... ill say more people are using facebook than any other weekday as they will be planning the weekend with their friends. This is a question asked by Google. Clearly, they want you to Google the answer. None. They all should be using Google+ 1159 less than the people active on Whatsapp in San Francisco at 14:31 on a Wednesday. Hello, Thank you for sharing your interview experience. As a small team of ex-Google employees, we have recently launched a new website, interviewjoy.com, where you can earn money by sharing your interview experiences/insights with other job candidates. (It is a marketplace for sharing job interview insights). Posting an interview consultancy service is totally free & anonymous and we are giving 50 USD sign-up bonus for the first 500 users. You are kindly invited to interviewjoy.com to check it out. Users already started making money on the website! Best Regards.. (For more information: onboarding@interviewjoy.com) |

### ASIC Verification Engineer at Zoran was asked...

You have 2 pieces of rope, each of which burns from one end to the other in 30 minutes (no matter which end is lit). If different pieces touch, the flame will transfer from one to the other. You cannot assume any rope properties that were not stated. Given only 1 match, can you time 45 minutes? 49 AnswersTake one rope (Rope A), place it down as a circle. Light match and start burning rope A at the tips that are touching. When the rope completely burns out, 15 minutes will have passed (since both ends are burning and being consumed at once). Hold the second rope (Rope B) straight and place one end so that it will immediately catch fire when the two burning points from (Rope A) finally touch and are just about to burn out. Thus 15 minutes on Rope A + 30 minutes on Rope B gives you 45 mins. How about this: Fold the first rope double so the ends touch. Lay it down and lay the second rope so it touches the fold of the first rope. Light the ends of the first rope. After 15 minutes the second rope should ignite. Once second rope finishes burning it is 45 minutes. Same principle as above, I just don't want to sit there for 15 minutes in order to light the second rope.... :-) Make a T. Simple Show More Responses Light both ropes at the same time with the match: ------------* () *---------- || then place the two ropes next to each other with the burning ends opposite each other: this way one of the ropes burns left to right, while the other is burning right to left. ----------* *---------- In 15 min the two burning ends will be next to each other. -----* *----- Great Puzzle, thanks! ** You cannot assume any rope properties that were not stated Burn like this *-------- ===> After 30mins, Rope A finished burning, and both ends of Rope B start burning burn one rope, wait till it gets to the half way point, then you transfer the first one to the second one to initiate the other flame. wait till the end. 45 minutes are up You have 2 pieces of rope, each of which burns from one end to the other in 30 minutes (no matter which end is lit). If different pieces touch, the flame will transfer from one to the other at the point at which the burn rate consumes the first rope to its point of contact with the second rope. The only thing we know about the second rope is that it will burn in 30 minutes if ignited from one end. There is no assurance the second rope will ignite, or burn at the stated rate, if an end is not made to point of contact. do you want to buy saints jerseys,vikings jerseys? depends on what the ropes are made of @eaasy you can assume that the second rope with burn at the same rate if lit from the middle, as the rope burns a set amount of time from either end. If Point A to Point B is the same as Point B to Point A, igniting from the center would cause the flame to finishing burning Point A AND point B at the same time. As for ignition, you have a point. There is no assurance that the first rope does not have a prolonged burn rate at the ends and an accelerated burn rate in the center. Therefore the second rope could have ignited before the first rope finishing burning (at any point before the 30 minute limit) which would make timing 45 minutes improbable. Lay one down, and have the second one touch the first rope perpendicularly at the midpoint. Light the first one, when it gets to the midpoint (15 minutes), the second will start burning. When the second one extinguishing you have 45 minutes. T. Simple, quick, walk away and do 45 minutes' work where you can still see light from the flame. Both ends will finish burning at the same time if environmental conditions are consistent. LAY THE TWO ROPES WHERE THE SECOND ROPE IS TOUCHING ONE END TO THE MIDDLE OF THE FIRST ROPE. IT SHOULD TAKE 15 MINUTES TO START THE SECOND ROPE AND THEN ANOTHER 30 TO COMPLETLY FINISH BURNING SO THIS IS 15+30=45 Show More Responses lay ropes end to end, to make one long length, when first length ignites the end of the second length, touch the last remaining end to it and let the flames meet somewhere in the middle. That way each flame will travel in the correct direction, are considered to be burning end to end, without ambiguously being lighted in the middle and hoping the direction will be as desired.... since it takes 30 minutes end to end, then to ignite both ends of the second rope will draw a 15 minute interval no matter what the burn rate is per divided section, thank you and I will accept $150 K per year and 30 days vacation time yearly as well... I had no idea that rope burning was so lucrative a career field... and I want my own rest room. it all depends on what kind of match you have. They said you have one match (no book or box) so if it's not a strike anywhere match then you're screwed. However, if it is then make the T formation... The vertical rope burns 30m then the horizontal burns both directions for 15. No loops, circles or folding required :-) burn A at the two ends will give you 15 min, and when finish A, then burn B next. Lay the map in a T formation, light two ends of the horizontal rope with the match. when the flames meet in the middle in 15 minutes they will light the second rope which is perpendicular to (and touching) the first rope. That rope will take 30 minutes to burn. Hence, 15 plus 30 = 45 minutes. burn A at the two ends will give you 15 min, and when finish A, then burn B next burn one rope, wait till it gets to the half way point, then you transfer the first one to the second one to initiate the other flame. wait till the end. 45 minutes are up Helpful Answer? Yes | No Lay the two ropes in a "T" shape. Burn the one rope at the bottom end of the "T". It will take 30 mins for the flame to go through first rope, and when it reach the other end, transfering the flame onto the second rope right at the middle with the flame move towards both directions, taking 15 mins to completely burn out. This is a silly riddle.... because we're not given the property that the rope can bend, the best formation for the two ropes is to lay them in the "+" formation that everyone got. However, no one mentioned burning the rope at the intersection of the two ropes, ropes will burn in 15 minutes. Also, there isn't anything saying you can't light the ropes more than once with one match (assuming you have the ability to light the match, as someone already pointed out as a significant problem), in that case, you could burn the ropes up in less than a minute. If the rope can bend, just bundle the ropes up into a ball and light the rope ball on fire... it take 1.3 seconds to burn the ball if you create the most efficient weave... true story, I was there. But of course, if you wanted to make the most efficient use of your time (e.g., if you're lazy), you can just crumple the ropes up together, drop the heap of rope on the ground, and throw the lit match on the pile and be done with riddle (and the ropes... and the match). I agree with a couple people here. In this you cant assume the rope burns uniformly. Therefore loop one rope and put the end of the other so it touches where the ends meet. so you have this C--- light the straight rope, when it burns it'll light the "C" which will burn in half the stated time (15 mins). Just a quick one for all the "T" people, you're wrong... The rope doesn't burn uniformly so you can't measure to choose time. If you could you may as well just cut one of the ropes... Show More Responses Solution: NO YOU CANNOT GUARANTEE 45min. Most likely solution to work: Straight followed by loop. ---O One straight, followed by a loop. Ignite straight first, have it ignite the loop. You ignite the straight, gives you 30 minutes. Loop ignites, both ends may burn at different speeds, but when it finishes it will be 30mn/2. The flame may end anywhere on the loop, not necessarily at the 1/2 way of the rope. Why wouldn't it work: Above, you're assuming the rope burns end to end. If the rope is really non-uniformly burning, you can devise a case where burning on both sides at the same time doesn't make the burn 1/2 the time: For example, the outside burns real fast and the core real slow: no matter where you ignite it, or how many times, it would burn in 30mn. For that case, you could split the rope at their diameter and maybe rig a solution. But likely there can be another counter example that can be built, more and more far fetched. Interviewer will want you to explain the thoughts, non-uniform burn, etc. So this is an opening to check your deductive powers. What's the purpose of such a simple question? To judge how you react and explain yourself? Fold each rope in half & mark them in the middle. Light 1 rope & when it reaches the middle light the other one. When the 2nd rope burns completely you'll be at 45 minutes. no comment Too easy... fold one of the ropes in half end to end with the full rope... viola! There are a couple of answers. It depends how you would interpret the question. "the flame will transfer from one to the other" Assuming no special materials you would have on the ropes. This phrase can be interpreted that THERE CAN ONLY BE ONE FLAME. Thus the flame moves from one to the other and does not multiply i.e you can have more than one rope or section of the rope burning .(If it could the solution is easy-just arrange both ropes end to end into a pentagon shape or do what some people have suggested above). for the 45 mins thing you do the T shape like people above suggested so 15+30 =45. If you assume you HAVE to take 45 mins this is the best way. Assume that an earlier finish is best, the Pentagon would be fast. -When I mean pentagon I mean the 5 pointed star thing you know from the occult.- If there was only one flame which could transfer from one rope to the other without creating multiple flames you would have to ask how fast does the flame transfer and what distance does the flame burn at before being transferred. The reason for this is, if the ropes are lied down next to each other TOUCHING each other then the flame would burn, transfer, burn, transfer etc. this would take 30 mins assuming that there is no time lapse on the transfer(hence my questions above). If you wanted to hit the 45mins like it said in the question just have both ropes lie next to each other but have the second rope start from the middle of the first. So after 15mins the second will burn and the flame from this point the remainder of the first rope(15mins) and the second rope will burn 30 mins. Sorry for the poor spelling . Cheers Take one rope, fold it over so one end touches the other, then cut the rope in half. Place one half of the rope at the end of the second whole rope so their ends are touching. Then light either end for 45 minutes of burn. I can't assume rope properties, but nothing says I can't cut it in half. Fold Rope A in half. Lay it down next to Rope B, which is not folded at all. Light Rope B. Reminds me of some of the stupid questions in the Corvirtus test. I took one recently and felt like a 3rd grader. I'm Schmart, I swer. Make a plus sign the the ropes. Light any one end. 15 mins to get get to center, 30 to burn the other rope. Show More Responses Must be a crew of techies answering this question. The obvious answer is to look at a clock. lay both pieces of rope down so that end of rope A touches the end rope rope B light the end of either rope, after 30min have passed the flame will transfer to the other rope,when the rope is half burn 45 total min will have passed. so yes you can time 45min. 45 minutes is easy. I would rather have an hour of light. Tie the ropes together, making one long rope. Light one end and get 1 hour. The Question is "Given only 1 match, can you time 45 minutes?". Option 1. You have a timing device and are allowed to use it - no prohibition stated in setup or question - of course you can "time 45 min" to the precision of your timing device. Option 2. We know: Ignition can occur at either end. From reaction start to reaction end of each rope takes 30min. We can not assume that the rope burns evenly, can be bent, lit up other than the ends or even transmit the flame to the outside of the rope (Think trapped chemical burn in a tube). Therefore we can NOT build a timing device. Put one rope in a straight line, bend the second rope into an O shape (with both ends touching one end of the first rope), when the first rope reaches its end, 30 minutes will have passed, and ignite the second rope. The second rope, which has both of its ends ignited at the same time, will meet at its center, timing 15 more minutes have passed. -> ///////////O Lay down both ropes evenly side by side. Slide one rope down 1/2 the length of the other then light one of the ends. Make a "T" with the ropes. 1 rope burns in 30 min, that rope is touching the middle of the second rope, and with two equal halfs(30/2) it should burn in 15 mins. ----------- -------------, then push them together First of all, the question is "Given 1 match, can you time 45 mins?"... well you can stand there with a match in your hand and time 45 mins with any stopwatch. Or is the question really can you time 45 mins using that match? Then using the match to create a shadow..... hem hem maybe not. Let assume the question was meant to be "can you burn both ropes in 45 mins?"... well it doesn't say anywhere that the match can only light one rope. I've lit many birthday cakes in my days and I promise that only one match can light a full array of candles. So if the ropes burn in 30 mins. and you light both of them with the one match then yes; the burning of the ropes should be done under 45 minutes. But then again.... maybe the question was "can you burn both ropes in EXACTLY 45 minutes?" Now the real answer I think is that the question need to be more clear :) Light one of the ropes from one side only. when it burns out completely (30 mins) light the second rope from BOTH sides. that will double the rate at which it burns, making it completely burnt out in 15 mins. Total 45 min Show More Responses ***CORRECTION*** didn't realize the "one match only" make a loop and a long rope running out of it (like a key figure) light the loose end of the standing rope. it will burn in 30 min. When it reaches the end it will ignite both sides of the other rope, doubling the rate at which it burns (i.e. it will burn to completion in 15 min only) that's a total of 45 min. Keep the first rope straight, and the two tips of second rope touching one end of first rope. Now lit the other end first rope. So first rope takes 30 min to burn and transmit fire to two ends of second rope which will take 15 min to burn. So total of 30+15= 45 min The answer is simple... Make a sundial with the match and the rope. Can Keep the ropes in this fashion----------》 《--------- And fire dem with opposite side burning. Now when both fire meet it wil be 15 mints...nw both have 15 mints remaining now bur first remain rope which will take 15 mints more and den burn second remaining rope which will take another 15 mints..so total 45 mints..isn't it simple ..;) The question does not state that the items in the question are required to provide the answer so... Take note of your start time. Take the first length of rope and lay it next to the match. Then, carefully inspect the second length of rope for any defects. If none are found, or even if there are defects present, place the rope on the ground in a straight line facing north to south. Place the first length of rope, which is tired to the match, approximately 5 feet to the north of the second length of rope. **Warning: This step requires quick action on your part** While the match is burning, tie the first length of rope to the match. Take the second length of rope and touch the north end to the match while it is still lit. Grasp the second length of rope in your left hand and spin 360 degrees counter clockwise and throw it as far as you can. Now go have a beer and keep an eye on your watch to see when the 45 minute timeframe has finished. |

### Executive Assistant at Allied Telesis was asked...

How honest are you? 36 Answers100% honest, only lied once in my life.-Now Not very, including the answer to this question... I'm so honest that working for a company that has an employee rating of only 2.0 out of 5 was one of my last choices of potential employers. Show More Responses Honest enough to inform you, your question sucks There is honest and dishonest. I don't believe in variable honesty. That's not to say that I am honest nor perfect, but being honest indicates depth of character. And I strive to be honest. Shooot. Did I say you look like a great company to work for? Need I say more? "It's my biggest character flaw" .... "I don't think honesty is a flaw..." "I don't care what you think." Always completely honest. Which if I was a liar, then I'd be lying. But if I said I was always lying about everything, would I be lying about that too? Therefore the question is fundamentally flawed Average honesty. Is this a critical requirement that nobody else could fill? This statement is false. I am as honest as your question is. You decide the percentage of honesty to your question & the same would be the answer to your question. How honest do you need me to be? i'm not...therefore i am... Show More Responses Norman, coordinate.. Every person has it's price beyond which there is no honesty in anyone. We are only as honest as we feel, at the moment of temptation. If we knew that we could get away with murder, we would murder anyone who stopped us or said no to us...which is every day. I am the most honest dishonest person there is. Pretty fu@king honest Very. Honestly - trust me. Well..... since this position is to be your Executive Assistant... let's clarify the question.... - when you ask How Honest are you - do you mean, like ,,,being honest when it comes to covering for your rear end when your wife keeps asking me if you're having an affair with the 23 year old blond bimbo down the hall here ? ....well ... I don't have to be honest about THAT ...if you don't want me to be ...I guess That's a strange question...Why do you ask ? Are you running some kind of organized crime ring out of this company or something ? I don't like your company. Honest enough to tell you I don't want to work for a company with a 2 star rating on glassdoor.com I'm pretty honest.. I'm a computer genius :) But these days I wonder whether I'm really much good anymore Show More Responses I lie in every sentence, so I am very dishonest. Notice this ANswer is a paradox, If what I say was true, then I am infact being honest in this question, answering truthfully. If what I said was false, it meant that I am a honest person but I just lied to you about being honest. If i am answerable to my Soul,you will Find me amongst the Top People in the List of honesty. depending upon your understanding capacity. you are the judge to mesure my honesty. Very honest, but that doesn't mean that I will disclose everything. How honest are yooouu? As honest a human can be You would not know it if not familiar with me and my answer or most people can express is 'i'm very honest" "That suit looks nice on you!" 4 out of 5 What an interesting questions. If I tell you that I am an honest person, I could be lying, which in tern makes me a liar. I could be telling the truth, and actually be an honest person, but how would you know? Would a liar really call themselves a liar, or would they lie and state that they are honest? I think my actions would speak louder than my words. Please, feel free to contact my previous employers, as well as the references I have provided. They can tell you about their personal experiences with me, and then you can determine from that information if I am an honest person or not. Personally, I feel that I am as honest as I can be. Show More Responses If I told you I was dishonest, I would be lying. I'm probably the most honest person you will ever meet. Honesty died with the old timers. Sadly but true. As honest as I need to be, but no more. |

### Software Engineer at Facebook was asked...

You have two lightbulbs and a 100-storey building. You want to find the floor at which the bulbs will break when dropped. Find the floor using the least number of drops. 37 AnswersStart moving up in increments of 10 floors and dropping the bulb until it breaks (ie: drop from floor 10, if it doesn't break, drop from floor 20, etc.). Once the bulb breaks, move down to the floor above the last floor it broke on and start moving up floors in increments of one until the second bulb breaks. This results in a worst case scenario of 19 drops. Surely a binary search method would be more efficient i.e. starting at 50 and either going up or down 25 floors based on if it breaks or not. If you do a binary search, what happens if it breaks at floors 50 and 25? Show More Responses Do you know what a binary search is? You drop it from floor 12 next. If it breaks, you know it breaks between floors 12 and 1, inclusive. If it doesn't, you know it breaks between floors 13 and 25, inclusive. The main principle of binary search is that with each step you reduce your search space in half. Now your search space consists of only 12 floors. Wow, I want to get asked such a question in an interview! >>you drop it from floor 12 next... if you broke it on 50 and 25... you are out of luck and out of bulbs... 19 drops is not the best worst case scenario... imagine trying floor 16, if it breaks, you try 1 - 15 and thats 16 tries. if it doesn't break, then try floor 31 and if it breaks, then try 17 - 30 (so 16 tries, including the try on floor 16). And on and on (45, 58, 70, 81, 91, 100). If you reach 91, you'll have tried 7 floors so far and if it doesn't break, then there's 9 more tries to get to 100 (thus 16 in the worst case) Even a drop from the ceiling of 1st floor, a simple light bulb will break. thats what i think It's a light bulb. It will break when dropped from the 2nd floor. Drop it there then go to the first floor, hold it over your head and drop it. first do a binary search (agressive first step - fast) with 1 bulb. when first breaks, you know X(last but one fall - success) and Y(last fall - failure). now do a linear search starting from X(conservative but accurate second step - slow). complexity = in between logN and N. Use Binary search starting with the middle 50 The complexity of binary search is logN . So it will be log(100) < 7. Based on my experience, I think it will be floor 1 itself . Drop from 1st floor. If it didn't break, drop the same bulb from 2nd. If it still didn't break, drop the same bulb from 3rd... repeat as necessary. Only one light bulb required :) Yes, but doing each floor, that will give you the most drops -- question relates to optimizing for "least" number of drops -- I didn't think about being able to re-use the bulbs...that obviously is helpful. Maybe a fibonaci sequence once you determine a "break" floor and a "non-break" floor. I'd probably fail completely at coding it...knowledge of optimization and prediction theory would certainly be useful. Let f(m,k) be number of tries for m lamps and k floors. Obviously f(1,k)=k. let f(2,k) be s. k<=(s-1)+(s-2)...(1) =s(s-1)/2. Therefore f(2,100)=15. Show More Responses Actually, 16 is not the optimal, nor is 15; you can do it in 14. Here is one solution (there are at least 5 other equivalents): * Drop first bulb at 14th, 27th, 39th, 50th, 60th, 69th, 78th, 85th, 91st, 96th, and (optionally) 100th until it breaks. * Go to the highest floor where the first bulb didn't break. * Repeatedly go up one floor and drop the second bulb. When it breaks, you have your answer. Why is 14 optimal? Since you are decrementing each time, you want (n) such that sum(1..n) barely reaches 100. The answer is n=14. Generally, if the number of floors is (f), the lowest number of drops is ceil((sqrt(8*f+1)-1)/2). This is the best worst-case scenario. An interesting related question is what gives the lowest expected number of drops. And no, I could not have gotten this in an interview. In theory, use one bulb to determine an interval, and use the second bulb for a linear search within the interval. The solution that decreases the interval by one for each trial is quite clever. In practice, however, take the nature of the problem into account: Start on the first floor and move up by one floor. That's the answer I would be looking for. Start with bulb 1 and drop it from floor 2. Doesnt break? then floor 4 Doesnt break? keep dropping the same bulb moving even number of floors all the way upto floor 100. If on some even floor the bulb breaks drop the second bulb from the odd floor below the even floor, to detect if its the even or the odd floor that breaks the bulb Best case detection: 2 tries (first bulb breaks on 2nd floor, second bulb breaks on 1st floor) Worst case: 51 tries (the fist bulb breaks at 100 and second bulb breaks or does not break at 99th floor.. ) Go to the 100th floor and drop the first bulb. It WILL break. Done, 1 drop. It doesnt say whats the lowest floor it will break at, just at what floor will it break with least drops. Thus floor 100. Alright guys...you have two light bulbs. ...the second one has to be used for linear search, let the worst case number of items to be searched be x, then your interval will also have to be x, which will result a worst case of 100/x drops for the first light bulb. So now you are just trying to minimize n=100/x+x, find n'=0 when x=19...the candidate's answer is correct. I meant...x=10. and n=19. 0 drops, 1 bulb......stop thinking like computer nerds. Use physics or an engineering mindset. They didn't prohibit the use of any tools. Grab a scale, figure out force req'd to fracture bulb. Calculate acceleration due to gravity adjusting for air resistance/barometric pressure at location (trivial for anyone who took a 1yr physics course). Figure out how many meters up you need to be based on the req'd acceleration. Done.... @Rich: I am sure they were hoping for you to give them a computing answer since they don't do physics, and rather do computer science. mer's answer is correct: 14. Let F(s, n) be the optimal worst-case number drops for s stories and n bulbs. Suppose we drop at floor f, constituting one drop. If it breaks, we must make up to F(f-1, n-1) drops. If it doesn't break, we must make up to F(s-f, n) drops. Thus, for a given floor f, we have up to 1 + max { F(f-1, n-1), F(s-f, n) } drops. Optimizing over f: F(s, n) = 1 + min{ max { F(f-1, n-1), F(s-f, n) } for f in 1..s} Using the appropriate base cases, we have F(100, 2) = 14, as mer has given. Another way to think about it is in terms of decision trees. We want to construct a binary decision tree with leaf nodes for floors 1..100, and at most one "left" turn per path from root to leaf. To minimize the height of the tree, we want to reduce the variance in the length of each root-to-leaf path. This suggest we try dropping the first bulb at floors of the form: a, a-1, a-2, .. a-b, where the sum a + (a-1) + .. + (a-b) is equal to or barely over 100, so that determining almost any floor (possibly excluding the top few) takes a drops. Using this approach, we get the sequence of drops that mer has suggested. Well done @mer I have seen this question posed many ways, and that is the best answer I have ever seen. Sure hope I get asked this one now Show More Responses 14 In my experience light bulbs break when dropped from any height above 3 feet nice explanation from http://www.programmerinterview.com/index.php/puzzles/2-eggs-100-floors-puzzle/ Depends on how accurate u want to be. If i want exact answer, drop one from fifty, if it breaks start from first floor woth the remaining bulb. If it does not break, then start from fifty first florr. u will iterate fifty times as worst case. If u want a approximate answer, u can do binary way with give or take twenty five floors. Step over based on accuracy needed. You are all ignoring valuable information in this question. We are talking lightbulb, not bowling ball, and building, not step ladder. The bulb will almost certainly break by being dropped from the second floor (assuming US numbering conventions). The chance of it surviving a 3rd floor drop are miniscule, but not zero. The chance of a 4th floor drop, even less. Therefore, drop it from the 3rd floor first. If it breaks, go to the second floor and try. If that breaks you know the answer is 2. If it by some miracle doesn't break from the 3rd floor drop, the answer is 4, but take the elevator up one floor and drop it just to see. Rinse and repeat to 5, but since it will have already broken, go out and grab a beer, and tell your friends how much fun you just had. n*(n+1)/2 = 100. n approx = 14. In worst case u can figure it out in 14 drops. 14th, 27th, 39th, 50th, 60th, 69th, 78th, 85th, 91st, 96th, and (optionally) 100th until it breaks. I believe the number sequence should be: 14, 27, 39, 50, 60, 69, ** 77, 84, 90, 95, 99 **. The 9 floor gap between floor 69 and 78 would result in 8+8 = 16 drops worst case. Easy. Answer is zero. You don't need a test to find out that a lightbulb is going to break, even when you drop it from the first floor, because it's made of glass. BigO(100/X + X-1), Where X is the number of floors. 100/X calculates the dropping times to break the first one and X-1 is the additional maximum overhead to break the second one starting from the previous dropping floor to the floor the previous bulb was broken. If you solve the derivative of the above equation equal to zero, the optimal solution becomes 9.9 ~= 10 . Worst case = 100/10 + 10 -1 = 19 If its a glass bulb it will break from a 2ft height...i wont even care climbing any floors to check. Show More Responses Once you break the first light bulb, you are FORCED to start at the highest safe floor + 1 (i.e. highest floor that you safely dropped bulb #1 from) and drop bulb #2 one floor at a time, moving upward. Therefore, the algorithm for the first light bulb is critical (cuz once it breaks you are counting by 1's upward). Binary search starts at the 50th floor ==> max # drops = 50 Choosing fixed increments rather than binary search, e.g. start at 10, increment by 10, yields better results ==> 25 The ideal solution is 14 drops ==> Start at 14, increment by 14 each step until it breaks (leaving for the reader why 14 is optimal). It doesn't matter what floor you are on to make a bulb break. Doesn't it matter how high off the floor the bulb is dropped. If I am on the 5th floor and the bulb is sitting on the floor of the 5th floor, how high off of that 5th floor do I need to drop it before it breaks. This is a misleading question. The question doesn't say that you will drop the bulb out the window. Drop both from eye level. Both will break, and I answered the question without even climbing one stair. Efficiency isn't always about math..Common sense Answer: 14 drops Mathematically: 14 is the first number n, where the sum of numbers from 1 to n is greater than 100 Trial and error: The worst case happens when the bulbs break at floor 13. If you start from the 14th floor and the bulb breaks, then you start at the bottom floor and work your way up. If it doesn’t break and you try it again from the 28th floor and it breaks, then you go back down to the 15th and work your way up 1 floor at a time. |

### People Analyst at Google was asked...

how many basketball can you fit in this room 25 AnswersDepends ... should we assume they're inflated? Determine the volume of the room. For example if the room is 10ftx10ftx10ft the volume would be 1000ft cubed. The average mens basketball has a diameter of 25cm. There is approximately 30cm in a foot. Therefor you could fit one inflated basketball in a 1 foot cubed space. Therefor you could fit 1000 inflated basketballs inside a room with a volume of 1000 ft cubed. If we can deflate the basketballs and flatten them down to one inch thick, this would allow us to place 12 flattened basketballs in a 1 foot cubed space. Therefore you could fit 12,000 basketballs in a room with a volume of 1000 ft cubed. It would be more complicated depending on the shape of the room but the process for figuring out the solution would be the same. Actually, what you want to do is figure out the ratio of the diameter of the basketball to a full foot. Basketballs are 10 inches, and 10 is .8333 of 12. Remember that, then figure out the volume of the room by multiplying height by width by length---divide this number by .8333. BAM. So, if its a room of 12 x 10 x 8, you get a volume of 960. Divide by .8333. 1152 is your answer. And this will get it quickly. Show More Responses Oops, I didn't tightly pack the basketballs, it would be closer to 1728 inflated basketballs if they were all tightly packed in a 10ftx10ftx10ft room. The correct answer is 1. You only said "basketball" in the question. The actual question is: "How many basketball[s] can you fit in this room” my take on this as follows: 1. Assume the size of the room 10' (ft)x 10' x 10' = 120" (inch) x 120" x 120" = 1728000 cu inch 2. size of the Basketball = 9" (inch) x 9" x 9" = 729 (basketball size ref @ http://www.nba.com/canada/Basketball_U_Game_Court-Canada_Generic_Article-18039.html) 3. 1728000 / 729 = 2370.370 ~ 2370 Basketballs (you cannot add 0.370 balls) Thanks Instead of working it out, anyone ever replied with something along the lines of: I'm sure you don't need to know how many basketballs can fit in here. Why don't we skip this question and save some time? I can put infinite number of basketballs, as long as I can keep enlarging the room. I don't need to do all the math or know the size of the basketball (which can be very small anyways - given the current technology I assume people can make a "basketball" in nano scale? Your are assuming the room is "empty"... What about you and the interviewer and the desk and the chairs and so forth. Those things take up space as well. Think about it. Because a basketball, like most matter in the universe, is comprised of 99.9999999% empty space (really, just a few atoms bound together by a "gluing" force we know little about, separated by empty space), if you manage to make a basketball dense enough, you could fit nearly an infinite number of them into any room. I wouldn't want to be around when that happens, because such things tend to create their own gravitational pulls, and event horizons. Between 1 and 1 million basketballs. You did not specify your error tolerance or accuracy requirement. It is always a mistake to jump to conclusions and provide answers without collecting data and doing the backup analysis. Google it. not too many if we want to adhere to fire code requirements. let's google the local FD and ask for guidance. Show More Responses An infinite number if the door is left open. I can fit more basketballs in this room than beach balls, but certainly less than footballs or baseballs. I guess that highest packing efficiency can be achieved if the spheres [or in this case 'basketballs'] are packed in a face centered system. So we can divide the whole room in the number of cubes with each cube's side = diameter of basket ball. Since one cube contains 4 balls so answer should be = 4 * No of cubes. Bingo! I guess Two. Two basketballs will fit in nicely in the room. Or five. Or 10. Or three. All are valid responses. The question doesn't ask what is the maximum number of basketballs that could fit in the room. Think back to high school chemistry. The most efficient packing schemes - hcp and fcc - where spheres nestle in the valley created by the spheres of an adjacent layer, fill almost 3/4 of the available volume - the actual figure is pi/(3*sqrt(2)), a smidgeon over 0.74. That only holds in regions of uninterrupted packing of course; a lack of fractional balls around the edges of the room will introduce complications we can only ignore if the length of the room's sides are all much larger than the ball diameter. So if the room volume is h*w*l and the volume of the ball is (4/3)*pi*r^3, and {h,w,l} >> r, and the packing coefficient is pi/(3*sqrt(2)), then the number of balls is: h*w*l * pi/(3*sqrt(2)) ----------------- (4/3)*pi*r^3 after cancelling stuff out this reduces to: h*w*l ----------------- 4*sqrt(2)*r^3 That's a bugger to do in your head, but if you're happy with an approximate packing density of 3/4 (close enough since the aforementioned edge effects will make the true value arbitrarily lower anyway), you can arrive at this simplified and much more memorable formula for the number of basketballs:: volume of room * sqrt(2) / volume of basketball-sized cube I can fit in just one basketball in the middle of the room and enjoy watching it! Or, I can maybe order one large basketball the size of the room, get it inside the room and inflate it till it fills the room...like MM said, it's a question of how many and not what's the max no of basketballs one can fit in that room With a gleam in my eye and a wry smile, I'd ask, "When is your next vacation?" I'd give out any random number lets say 100... If he say I counted and thats what is the answer (confidently). If he denies then ask him to prove you wrong by getting 100 basketballs :D say a big number based on the room if they ask how or y tell them to check it out....... I would ask myself how many basketballs I have first. Show More Responses I think the answer is ZERO.firstly if u use standard basketball then by calculation you can get the answer, but its an interview not an exam. n if u try to fit a basketball of the size of room then too some space will be left on the corners. so i think its ZERO floor[room_length/basket_ball_diameter] * floor[room_width/basket_ball_diameter] * floor[room_height/basket_ball_diameter] |