# Interview Questions

interview questions shared by candidates

## Interview Questions

What is the effect of $10 of depreciation on the three accounting statements? 1 AnswerIncome Statement: Because depreciation is an expense, Operating income (EBIT) decreases by $10. Net income also declines by EBIT*(1-tax rate). Assuming a 35% tax rate, NI decreases by $6.50. Balance Sheet: Cumulative depreciation increase $10, so PP&E (Plant Property and Equipment) decreases by $10). The reduction in net income also causes a Reduction in Retained Earnings by $6.50. Cashflow Statement: Net income decreased by $6.50 and D&A increased $10, cashflow from operations increases by $3.50. |

### Anti Money Laundering at Citi was asked...

how do you deal with conflict at work, what is your biggest weakness |

### Anti-Money Laundering Analyst at Citi was asked...

How do you prioritize your work? 1 AnswerMake sure to eliminate the hardest projects first. |

Suppose you had eight identical balls. One of them is slightly heavier and you are given a balance scale . What's the fewest number of times you have to use the scale to find the heavier ball? 44 Answers3 times. (2^3 = 8) Two. Split into three groups of three, three, and two. weigh the two groups of three against each other. If equal, weigh the group of two to find the heavier. If one group of three is heavier pick two of the three and compare them to find the heaviest. Brian - this would be correct if you in fact were using a weighing scale, and not a balance scale. The ability to weigh one group against another with a balance scale allows Marty's answer to be a correct answer. Although - the question as worded provides a loophole. If it had been worded as "What's the fewest number of times you have to use the scale to CONSISTENTLY find the heavier ball", then Marty's answer would be the only correct answer. However, it is possible that you could get lucky and find the heavier ball in the first comparison. Therefore, the answer to the question as stated, is ONE. Show More Responses This question is from the book "How to move Mt Fuji".... Marty has already got the right answer. Actually Bill, by your interpretation of the question the answer is zero, because you could just pick a ball at random. If you get lucky, then you've found the heaviest ball without using the scale at all, thus the least possible amount of times using the scale would be zero. The answer is 2, as @Marty mentioned. cuz its the worst case scenario which u have to consider, otherwise as @woctaog mentioned it can be zero, u just got lucky picking the first ball.... None- weigh them in your hands. Assuming that the balls cannot be discerned by physical touch, the answer is 3. You first divide the balls in two groups of 4, weigh, and discard the lighter pile. You do the same with the 4 remaining, dividing into two groups of 2, weighing, and discarding the lighter pile. Then you weigh the two remaining balls, and the heavier one is evident. 2 3a+3b+2 = 8 if wt(3a)==wt(3b) then compare the remaining 2 to find the heaviest if wt(3a) !== wt(3b) then ignore group of 2 discard lighter group of 3 divide the remaining group of 3 into 2+1 weigh those 2 If == the remaing 1 is the heaviest if !== the heaviest will be on the scale With the systematic approach, the answer is 3. But, if you randomly choose 2 balls and weigh them, and by coincidence one of these two is the heavier ball, then the fewest number of times you'd have to use the scale is 1. Although the real question is: are the balls truly identical if one is heavier than the rest? just once. Say you are lucky and pick the heavy ball. One use of the scale will reveal your lucky choice so once, or the creative answer zero if you allow for weighing by hand Without judging by hand: Put 4 balls on one side, and 4 on the other. Take the heavier group and divide again, put 2 balls on one side, and 2 on the other. Take the 2 that were heavier, and put one on each side. You've now found the heaviest ball. This is using the scale 3 times, and will always find the right ball. Show More Responses None. They are identical. None is heavier. 2 weighings to find the slightly heavier ball. Step 1. compare 2 groups of three balls. Case 1. if they are both equal in weight, compare the last 2 balls - one will be heavier. case 2. If either group of 3 balls is heavier, take 2 balls from the heavier side. compare 1 ball against the 2nd from the heavy group result 1. if one ball is heavier than the other, you have found the slightly heavier ball. result 2. if both balls are equal weight, the 3rd ball is the slightly heavier ball. Easy Shmeezi Fewest - get lucky and pick the heaviest one. But wait! How would you know it is the heaviest one by just weighing one ball? Your logic is flawed. Two groups of four. Split heavier one, weigh. Split heavier one, weigh. 3 times. i think its 3. i would take it like this OOOO OOOO then OO OO then OO problem solved. i do this everyday. bye. praise be to allah. thats it. It's 2. Period. If you can't figure it out look it up online or in "How Would You Move Mount Fuji" (like somebody else said). This is one of the most basic brainteasers you could be asked in an interview. The answer is 2. 1) Divide the balls into 3 groups. 2 piles with 3 balls each, 1 pile with 2 balls. 2) Weigh the 2 piles of 3 balls. If both piles are the same weight, discard all 6 and weigh the last 2 to find the heavier one. 3) If 1 pile of 3 is heavier than the other, discard the lighter pile and the pile of 2 balls. Weigh 2 of the remaining 3 balls from the heavier pile. If both of the weighed balls are equal, the last ball is the heavier one. 2=if all the balls are identical and you pick up the first...weigh it and the second one is lighter or heavier then you've found the heavier ball in the least amount of attempts. 1=if all the balls are identical and you pick up the first...balance it and the second one is lighter or heavier then you've found the heavier ball in the least amount of attempts. Amy is 100% correct for the following reason: everyone (except Amy) is solving the theoretical problem. The practical side of the problem - notwithstanding jimwilliams57's brilliant observation that if one weighs more than the others IT IS NOT IDENTICAL (would have loved to see the interviewer's face on that one) - in order to 'weigh' them on a scale, one has to pick them up, therefore, you will immediately detect the heavier one without weighing: pick-up three and three ... no difference, no need to weight. Pick-up the remaining two to determine the heavier one. Steve First off, take yourself through the process visually and forget square roots, that doesnt apply here and here is why: The question is the Minimum, not the MAXIMUM. BTW, the max would be 7 ( 8-1); you are comparing 2 objects, so 1 ball is eliminated automatically in the first step. Anyway, you have a fulcrom of which you are placing 2 of 8 objects on each end. If by chance you pick the slightly heavier object as one of the two balls, you have in fact, found the slightly heavier one in the first round... btw dont be a smartass with your interviewer, he is looking for smarts not smarmy;) Show More Responses Respectfully, the folks who are answering "3" are mathematically modeling the nature of the balance incorrectly. Performing a measurement on a balance scale is not binary. It is trinary. Each measurement gives you one of three responses: The left is heavier, the right is heavier, or they are equal. So while you do need three binary bits to specify a number from one to eight, you need only two TRINARY-DIGITS Formally, you want the smallest value of n such that 3^n >= 8. The answer is 2. Note that you could add a ninth ball, and still, you'd only need to make two measurements. Of course, the smarty pants answer would be one. Just pick two balls at random and be lucky to have chosen the heavy one. But you're not guaranteed to be able to do it in just one measurement. English isn't my mother tongue... What is a balance scale? If looking up on Google, I find some devices with two bowls on a bar bearing in the center. Hence, the answer is once (if I'm luck enough to select the heavier ball in teh first measurement) If a balance scale allows to measure only one ball at a time, then it would take two measurements, unless you'd have more information on the weight, which is not listed here, hence doesn't exist in the context of the question^. 3 times. Not having looked at the other comments, hopefully, I am the 26th to get this right. Put the balls 4 and 4 on the scale, Take the heavier side and place those balls 2 and 2 on the scale. Take the heavier side and place them 1 and 1 giving the heaviest ball. OK, now I read the comments and see that the people, like the question are divided into to groups, systematic approach people that say 3 (like I did) and analytic people that say 2. It takes a systematic person (me) a minute to get the answer. I'm guessing it took the analytic 5 minutes just to interpret all the ramifications of the question, i.e. they aren't idenitical if..., do it by hand..., get lucky. minimum is 1 (if lucky - 25% chance by picking 2 balls at random) & max is 2 (using most efficientl process to absolutely determine without luck - 3/3/2 scenario) While Symantec was busy weighing my balls I took a job with NetApp.... They need to focus on hiring good, capable security engineers, not weighing their balls. The point of these interview questions is to both check your logical brain function and to hear how you think. Most of you are just posting jerk off answers trying to be funny, or you are really dumb. These answer get you nowhere with me in an interview. Think out loud, go down the wrong path back track try another logic path, find the answer. None of this "0 if you use your hands". That is fine if you are interviewing for a job in advertising where creativity is desired, nobody wants you writing code like an 8 year old. You have 12 balls, equally big, equally heavy - except for one, which is a little heavier. How would you identify the heavier ball if you could use a pair of balance scales only twice? The problem is based on Binary Search. Split the balls into groups of 4 each. Choose the heavier group. Continue till you get the heavier ball. This can be done in log(8) (base 2) operations, that is, 3. Since there is only one scale available to weigh. You first divide the balls in half. Weigh each group, take the heaviest group. This is using the scale twice so far. Now, divide the previous heaviest group into half, weigh both groups. Take the heaviest. Divide this last group and take the heaviest. This is the heaviest ball. We have used the scale 5 times. Show More Responses Would it be wrong to say for a sample size as small as 8, we might as well not waste time thinking about an optimal solution and just use the scale 7 times, as this will be more efficient than coming up with an ideal solution prior to using the scale? 3. I stumbled across this while looking for something else on Google but I had to answer. It is 2, split balls into 2,3 and 3. weigh the 2 groups of 3 against each other. If equal weigh the group of 2 and the heaviest is obvious. If they are not equal keep heavy group of 3 and weigh 2 of the balls. if equal heaviest ball is one you didn't weigh. If not equal the heavy ball is obvious. 2 times. 8 balls. 1st step: [3] [3] [2] 2nd step: [[1] [1] [1]] [[1] [1] [1]] [[1] [1]] No idea The fewest number of times to use the scale to find the heavier would be Eight to One times ? It will actually be 1 because the question asks what's the fewest amount of times which is one because you could just get lucky you can use any method you want it would still be one because that is the fewest amount of turns you can have It's one. The fewest number of tries on using a balance scale would be one. If you put one ball on each side and one is heavier, you have the found the heavier ball. Use an equilateral triangular lamina which is of uniform mass throughout. It is balanced on a pole or a similar structure. Steps: Place 2 balls at each corner (total 6 balls) i. if the odd ball is one of those, one side will either go up or go down. Now repeat the process with one ball at each corner including the 2 unbalanced ones. ii. if balance is perfect, repeat the process with the remaining two balls and one of the already weighed balls. test answer 2016-01-12 00:34:07 +0000 Show More Responses You would not be able to find a ball heavier than the others. All eight balls are identical; therefore, they must all be the same weight. |

### Trader at Morgan Stanley was asked...

If two cars are traveling in a two lap race on a track of any length, one going 60 mph and the other going 30mph, how fast will the slower car have to go to finish at the same car to finish at the same time? 30 AnswersIt's impossible, the faster car will be done the race by the time the slower car finishes the first lap. the answer to this question lies on how long the race track, we can solve its mph if we know how long the track we be. Well, this is interesting because there are no track details and makes for multiple answers through ambiguity and assumptions. i.e. One could assume that it is a circular track and that the two lanes are very wide and that one car is on the outermost furthest from the centre and the other is on the track very near the centre. The circumference of each track therefore could be such that the faster car would have to travel twice the distance that the slower car has to and therefore the two cars would arrive at exactly the same time. The is why cares on a racetrack must start at offsets to each other or have their times corrected in some other way! In real-life, this is highly unlikely however it does demonstrate my point. Show More Responses I agree with the first answer (by the Interview Candidate). When the slow car completes the first lap, the fast will complete the second lap. It does not matter how fast the slow car goes on the second lap; it cannot win... 90 mph Wouldn't the slow car just need to go 60mph? It doesn't say that the fast car is going double the slow cars speed only that the slow car is going 30 mph and the fast is going 60mph. The question is a trick. It says how fast will the slower car have to go to finish "AT THE SAME CAR" to finish at the same time? It can go any speed!! It will always finish at the same car (2nd) at the same time. The car isn't changing!!! I'm assuming that the question, as typed, was entered incorrectly and that it should be worded, "How fast will the slower car have to go to finish at the same time as the faster car?" The answer is 30mph. Because that's how fast the slower car is going. Nowhere in the question does it state that the cars are at the same point on the track. The slower car is currently halfway between the faster car and the end of the race. The two pieces of missing info are: 1. How long is the distance of the track and 2. The distance that each of the cars has already traveled on the track. If you have that info then you can figure it out. The two pieces of missing info are: 1. How long is the distance of the track and 2. The distance that each of the cars has already traveled on the track. If you have that info then you can figure it out. I totally agree with wildfire. Did you just say, "If two cars are traveling in a two lap race on a track of any length, one going 60 mph and the other going 30mph, how fast will the slower car have to go to finish at the same car to finish at the same time?" WTF? Are you having a stroke? Try to raise both hands above your head. OK, now smile for me. And would you please try to say a complete sentence? The way the question is currently worded, it does not indicate any of the following: 1. Whether the two cars started at the same place, at the same time (we can infer "same place, same time" because it is a race), 2. Whether either car has traveled any distance at all (if yes, then how far; if the slower car has traveled one lap, then the faster car has finished, and if no, then the answer is 60 mph), 3. What is the shape of the track (to Alanjai's point, a regular track requires offset starting positions, whereas a figure-8 track with fixed lanes would not), and finally 4. Why the question is worded so poorly ("to finish at the same car to finish at the same time" ... I mean, come on, that's practically not even literate). Show More Responses Speed a = Car A speed = 60 mph b = Car B speed = 30 mph t = Time Elapsed (in hours) d = Race Distance (in miles) ((t * a) = distance traveled by Car A) - d = Distance Remaining Car A = dra ((t * b) = distance traveled by Car B) - d = Distance Remaining Car B = drb x= mph that Car B has to drive for the remainder of the race (drb/dra)= y y * a = x or ((t*b)-d))/((t*a)-d)) = y y * a = x Example: t = 1 hour d = 240 miles ((1 * 60) - 240 = 180 [distance remaining Car A] ((1 * 30) - 240 = 210 [distance remaining Car B] 210/180 = 1.666666667 1.666666667 * 60mph = 70 mph, the speed that Car B has to drive for the remainder of the race. oh, yeah... in case you couldn't guess, I'm a Digg user. oh, yeah... in case you couldn't guess, I'm a Digg user. I agree with wildfire. This question is not grammatical and is unsolvable as written. The point seems to be that you should read the entire question (review the entire problem) before jumping in to solve the question that is immediately apparent. So, attention to detail is important at this company. Assuming the question was mistyped into this discussion, and they want to know how fast the second car would have to go to finish at the same time as the first car, then the answer is: infinitely fast. The question is better expressed as: A car is driving a sixty-mile path at thirty miles per hour. At the half-way point, the driver wants to speed up so his average speed at the end of the path is sixty miles an hour. How fast does he have to go? At the half-way point (30 miles) he has taken one hour for his drive. To average 60 MPH, he would have had one hour for the entire road. Therefore he has no time left, and must travel infinitely fast (for zero time) to average 60 MPH. It doesn't matter what answer you give, it is how you come to your conclusion that counts here. There is missing information on purpose because they want to see how you solve problems, not if you can solve problems quickly. The cars, the track the speed doesn't matter, it is the questions you ask and the information gathering that counts. Since there are only 2 cars in the race, the race is over and the instant one of the cars passes the finish line. One car finishes first, the other finishes second by default. The answer is that it doesn't matter how fast either of them are going, or how long the track is. They will always finish at the same time (not to be confused with "finishing with the same lap time"). I agree with SteveC. Once the either car finishes, the race is over. The question was clearly misworded. If not, most of you would have failed. The best answers here are from toolbelt_1 and dadag. Morgan Stanley needs people with exceptionally strong quantitative abilities and communication skills. The interviewer gives you a vaguely worded question to see (1) how you would gather the rest of the information and (2) how you would use it. In the course of a real workday your manager, client or other stakeholder will rarely provide a perfectly well-defined request for information. In the heat of the moment, important questions are worded quickly and vaguely, yet your performance will be judged based on how well you respond. One of your most crucial job skills is determining true requirements through timely and effective follow-up communication, intuition and experience. Show More Responses Both cars will finish at the same time if the track length was 0. This is typical of Morgan Stanley. Search a bit more and read about the lack of communication and clarity within this company--and when the result is as it should be (wasted time and effort) they blame the lower level worker as Al did above. If you ask for more information, you get more of the same -- confusion. Al might ALSO work for Morgan Stanley and makes a flimsy excuse for wasted time in having to track down pertinent information for the task. He makes no mention of the increasing frustration, lost productivity and the poor underlings that take the blame for poor managers. There are a few upper level managers who communicate and instruct their reports very well. It is a breathe of fresh air. They will tell the report the objective, quick background and the task and then you go do it. That simple. Others have more time for backstabbing, gossip and slimy character demonstrations than instructing their reports. No wonder they will never catch up to Goldman Sachs. They just don't get it. it's quite easy guys, just think: 30 mph is the current speed x is the race lenght 60 mph is the target average speed so theanswer is 30*(miles raced/ total race) + speed to achieve*(iles missing/tot. race) = 60 speed = i know that yu can dothis.....;) I'm pretty sure this is how the question is supposed to be worded which makes Mike's response correct. If two cars are traveling in a two lap race on any length track, one going 60mph for the entire race and one going 30mph to begin the race, how fast must the slower car travel for the rest of the race once the faster car finishes its first lap to finish at the same time as the faster car? If this is the case then we can do the following. distance = rate X time let d = the length of the track. After the fast car completes one lap the slow car will have completed one half lap, or .5d So the fast car has d left to go and the slow car has 1.5d left to go. since distance = rate x time, and the fast car is going at 60mph, we have d = 60t where t is time. For the slow car, if we let x be the rate it will go (so what we're ultimately trying to solve for, we have 1.5d = xt. now substituting d = 60t in we have 1.5 x (60t) = xt Since the track has some distance, t cannot be zero so we can divide t out leaving 1.5 x 60 = x = 90mph. Hence the slow car would have to travel 90mph the second lap to finish at the same time as the fast car. Make it simple, it depend on the fast car, if fast car got no problem( like break down , flat tires...), it hard to pass. The slow car just got to wait, time and opportunity is the key. Car A - 30mph Car B - 60mph One Lap - X miles Car A will have to decide whether it wants to catch up before completing the first lap. Otherwise it's over. We have two missing variables. We can't solve it. The speed will be calculated based on car's A location. Car A has to accelerate at any point prior reaching X. For instance, at 1/2X miles Car A will have to travel 90mph to finish at the same as time as Car B. But at 3/4X it will have to go faster. So the closer it gets to reaching X, the faster it will have to drive. Let's say the track is 60 miles long. Car 1 has completed a lap of 60 miles after one hour, and car 2 has traveled 30 miles. For the second lap (which is one hour for Car 1 to finish), car 2 must travel 90 mph. This works with any distance; this one is the easiest to visualize. |

GIven 9 balls all of which weigh the same except for one, what is the minimum of weighings necessary to find the ball weighs more (or less). 28 AnswersAnswer = Maximum of three steps to find heavy ball. Put one tennis ball aside and put the other 8 on the scale - 4 on each side. If the scale is balanced you're done - the one you put aside is the heavy ball If not Remove the 4 balls on the light side of the scale. The heavy ball is one of the four still on the scale. Spit these four in two on each side of the scale. Remove the two on the light side of the scale. The heavy ball is one of the two remaining balls on the scale. Split the two remaining balls. Your done. Solution #2 - heavier ball found in two steps: Step 1: group 9 balls in sets of 3. Reserve 3 balls(a), put 3 on each side of scale(b) and (c). Observe that heavier ball is in one of three sets, (a), (b) or (c) - either the scale side that dropped or the reserved set, if the scale balanced. Step 2: Split the set with the heavier ball - reserve one and place one on each side of the scale. Observe that heavier ball is one of the 3 balls, - either the scale side that dropped or the reserved ball, if the scale balanced. Solved in two steps. While the solution above is correct, more or less, you first should clarify the question and spell out any assumptions. The assumption here is that you know or are aware beforehand that only one ball is of different weight. Sometimes your ability to clarify and state assumptions is more valuable than getting the right answer. Sometimes you can arrive at the right answer with the wrong logic which helps you solve this problem, but may mess you up in the future. You could do this with two weighings assuming its a two pan balance - (1) place three balls on each side - if they balance out then its the remaining three that has abnormal ball (2) out of that group, place one ball on each side - if balances it out, the abnormal ball is the remaining one. If the weighing in step (1) does not balance out, grab the group of three balls that is light or heavy and repeat step (2) described above. Show More Responses I began with the assumption you could do this with a minimum of three, but I now believe it's four. Perhaps I'm over thinking it though, so I'll explain my "solution". Step 1. Start with three balls on either side of the scale, with a third set waiting on the sidelines. If the scale is balanced, you can move onto the three waiting. 2. place one ball on either side, again with the last one waiting. Should the scales be balanced, it's the last one. 3. If they aren't, take the heavier side off, and place the waiting ball on, if they balance. It's the one you just removed. If they're off canter again, it's whichever side was inconsistent. The hitch with the fourth measurement comes due to the little trip up in the question "To find the ball that weighs more (or less)." If you don't know from the start if you're looking for a heavier or lighter ball, should the scales be off on the first measurement, you'll need to replace three of the balls with the reserves to determine which ones are the odd batch out. The comment about the assumptions is absolutely spot on. For example, I like the answer that says ONE step (weighing) but this assumes a balance scale is used not a device that weighs each ball. Based upon a weighing device that weighs each ball and remembering the question is the MINIMUM number of weighings then the answer is THREE - here is the logic. Each weighing weighs one ball. The minimum number of weighings to identify a difference is two, i.e the first two balls are different in weight. The third weighing will confirm which of the previous two is part of the set of eight balls with the other being the odd one out. Simple....8 of the balls are hollow.....1 is not. Maybe I'm slow but....if I put set A and set B on the scale while reserving set C, and if set A is heavier than set B, how do I know if set C is equal to set A or B without weighing it? Notice the question says "more (or less)". In other words, why wouldn't I have to weigh set C? (This is assuming each set is of 3 balls.) Suncoastgal has a point, and most of the answers above are simplifying this problem a bit. You are not told if the odd ball is heaver or lighter, which complicates things. The most efficient method is that described by 'questions like this...' as method 2. Split balls into 3 groups and weigh two. The worst outcome is if the groups do not weigh the same, so assume that happens. All you know now is that the odd ball is NOT in the reserved group of 3, so set those aside. You don't know which of the two weighed groups contains the odd ball, so now you have 6. Repeat the first step with groups of 2 balls. Again the worst outcome is that the scales don't balance, so you've eliminated 2 more balls and only know that the odd ball is one of 4. As near as I can tell, you still need 2 more steps now to guarantee finding the odd ball: Choose any two balls from the 4 and compare. If they are the same, the odd ball is in the reserved 2, if they differ the odd ball is one of the two you weighed. Now take one of the two balls that might be odd, and weigh against one of the balls you have been setting aside as 'normal'. By the way, although you now know which ball is odd, you may still not know if it's heavier or lighter. If the last weighing balances, you only know that the other ball is odd, and you would have to weigh it against one of the 'normal' balls to see how it is off. You can do this problem in only 2 weighings if you are told whether the odd ball is heavy or light before you begin. Suncoastgal has a point, and most of the answers above are simplifying this problem a bit. You are not told if the odd ball is heaver or lighter, which complicates things. The most efficient method is that described by 'questions like this...' as method 2. Split balls into 3 groups and weigh two. The worst outcome is if the groups do not weigh the same, so assume that happens. All you know now is that the odd ball is NOT in the reserved group of 3, so set those aside. You don't know which of the two weighed groups contains the odd ball, so now you have 6. Repeat the first step with groups of 2 balls. Again the worst outcome is that the scales don't balance, so you've eliminated 2 more balls and only know that the odd ball is one of 4. As near as I can tell, you still need 2 more steps now to guarantee finding the odd ball: Choose any two balls from the 4 and compare. If they are the same, the odd ball is in the reserved 2, if they differ the odd ball is one of the two you weighed. Now take one of the two balls that might be odd, and weigh against one of the balls you have been setting aside as 'normal'. By the way, although you now know which ball is odd, you may still not know if it's heavier or lighter. If the last weighing balances, you only know that the other ball is odd, and you would have to weigh it against one of the 'normal' balls to see how it is off. You can do this problem in only 2 weighings if you are told whether the odd ball is heavy or light before you begin. If the question to identify the odd ball (heavy or light) out of 9 balls is read literally, then the answer is 1 weighing (under the most luckiest of circumstances): weigh 2 sets of 4 balls against each other using a double-pan balance and if you're lucky it will weigh evenly, allowing identification of the not-weighed 9th ball as the odd ball. (The question doesn't say you need to identify whether it was heavy or light.) If the question is what is the least number of weighings it takes to identify the odd ball under the least lucky circumstances then the answer is 4, as best I can come up with. 1. Weigh 2 sets of 3 balls against each other, setting aside the 3rd set of 3 balls. The least lucky result ("LLR") is an imbalance. However, this does identify the 3rd unweighed set as all standard balls. 2. Here's where creative problem solving/out-of-box thinking comes into play. Take a red and black marker and mark one of the heavy balls red and one of the light balls black. Switch the marked balls. LLR --> still an imbalance, though imbalance must remain in the same direction since there is only 1 odd ball (yet to be identified). 3. Repeat step 2 (mark one of the unmarked heavy balls red and one of the unmarked light balls black, switch them and reweigh). LLR --> still an imbalance. 4. Take one of the 3 unweighed balls, previously set aside from the 1st weighing, and substitute it for the last remaining unmarked heavy ball. If this last weighing results in an imbalance then the odd ball is the last remaining light ball (and is light, obviously). If the weighing results in a balance, then the removed unmarked heavy ball was the (heavy) odd ball. These type of interview questions are so lame. They don't sniff out the lazy people, the coders who write crap no one can decipher, and can't or won't write maintainable code. Yes you want people who can problem solve and break down problems into manageable chunks, but how often do software projects fail? Answer = 70-90% and that's mostly due to poor management, not giving clients what they want, feature creep, poor quality, etc. So how is answering this question going to tell me that this new hire has integrity and can throw out his ego and write code for a real life product that people want to use? No wonder so much software is trash. (And yes I've been programming for 25 years and see the same errors happening over and over, it's pathetic and completely fixable.) I read the question as "determine if the odd ball weighs more or less", not "determine which ball is the odd one out". After re-reading the question, it seems like the word "IF" (i.e. "...to find [IF] the ball weighs more (or less)") or the word "THAT" (i.e. "...to find the ball [THAT] weighs more (or less)") is ommitted (purposefully?). I went about answering the my first interpretation and came up with 2 weighings as the MINIMUM required. I assumed we have a scale that can accurately measure the weight in grams (or whatever unit of measurement needed to accurately measure the ball). Step 1. Weigh 8 balls. Divide the total weight by eight. Step 2. Weigh the remaining ball. If you compare the result from each step you'll know if the ball is heavier or lighter than the others. Only 1 step required. Throw all of the balls in a sufficiently deep enough pool of water. The ball that sinks the fastest/slowest is the ball that doesn't weigh the same. If all of the balls float, then it is the ball that is lowest/highest in the water that doesn't weigh the same. Show More Responses The answer should 1 as it asked "the minimum". When you weight 4 balls on each side of the scale and find it equally weight then the 9th ball is definitely the odd ball. You can always got lucky on the first attempt! I understand the Question to be what the minimum of weightings needed is to find out if the different ball weighs more or less than the other 8. The answer is three. 1. You way 1 ball and get its weight 2. Weigh a second and get its weight 3. If they do not weigh the same way a third to see if the different ball is the heavier or lighter one. Or If they weigh the same weigh all the balls and divide by 9 if it is less than one of the balls you weighed the different ball is lighter. If it is more than one of the balls you weighed the different ball is heavier. I agree with Anonymous in that these questions don't tell much about character. However, I can't beleive nobody here is analytical enough to come up with the correct answer. First off, the question is not stated correctly. The scale should be a simple balance, and the objective is to find the "odd" ball AND determine if it is heavy or light. The answer is three. First separate into three groups of three, G1, G2, and G3. In the first two weighings you can determine which group has the "odd" ball AND if the odd ball is heavy or light. Weighing 1 - weigh G1 against G2: Two outcomes 1) G1 == G2 --> Odd ball is in G3, in Weighnig 2, use either G1 or G2 against G3 to determine if Oddball is H or L 2) G1 != G2 -> Odd ball is NOT in G3 but you now know if G1 is heavier or lighter than G2, in Weghing 2, use either G1 or G2 against G3, for instance use G2 and G3, if same, then G1 has oddball and you know if its H or L, if G2 != G3, then G2 has odd ball and you know if it is H or L Now that you know which G it is in And the disposition of the Oddball (Heavy or Light), weigh any two of the Group containing the oddball, and based on your knowledge of wether the oddball is H or L, you know which one it is and its disposition. Any offers?? The question is perfect to define how the person takes directions - how many assumptions the person does before start the job - how many questions the person asks (if asks) to make clarifications before start the job. Also, I see there another result - all answers come finally to two groups of getting result : 1) to get faster the first result but more steps for guaranteed result - from 1 to 4 steps or 1 to 4 weightings for combination 4+4+1 2) to get faster guaranteed result - from 2 to 3 steps for starting combination 3+3+3, I would say that BMF scheme contains one additional step (comparison of weight lighter/heavier - definition what of them is consider to be "odd" ), which in solution structure should be equal to the additional step, so it comes to from 2 to 4 steps but still in 2 to 3 weightings. After all, I would say that you may get from this question: How the person understand the task How many assumptions the person does before start the job How many questions the person asks before start the job How many solutions and ideas the persons generates. How the person make a choice to present one solution from multiple (say fastest first result vs fastest guaranteed result). Etc. The candidate should clarify if they truly mean the minimum to find the odd-weighted once, or everytime. I agree that it only takes one weighing (and some luck) to find it. Actually, the person could randomly guess (not weigh any) and get the right ball. So you need to understand the balance of risk vs. cost. By the way, simple logic problems do trip up people that you don't want working for you (depending on the job). So I like the question. It is interesting to speculate if the question wording is being cute or tricky by saying "more (or less)". Is it just being general and saying find the odd ball, or is it being tricky and saying find the odd ball AND tell me if it is lighter or heavier. I think it is being over thought here and just means find the odd. In that case the answers saying 2 weighings is the best you can guarantee. None of this lucky crap. BMF had it if you had to determine if it was in fact heavier or lighter instead of being told. So if the question had the added clause that if you really tried it and didn't get it in the number of tries you answered (or fewer), then you would be killed, would you still say "just one if you get lucky"? Keep it simple. If it's 3-state balance you need log2(9) / log2(3) attempts since you can encode 9 states using 2 3-bit states. I don't understand why everyone is confused. The question clearly asks to not only find the odd ball out but to also determine if the odd ball is lighter or heavier. The only assumption is that it is a standard two pan balance. My solution is 4 weighings: 1. Divide 9 balls in three groups of 3. Let's name them A,B,C 2. Weigh any two groups of 3. Let's say A and C. (1st weigh) 3. If A and C are equal then the B group is the culprit. 4. Now lets label the B group as B1, B2, and B3 5. Take either two balls from either A or C and measure against two from B let's say B2 and B3. (2nd weighing). If both are equal then B1 is the odd ball. Now weigh B1+ one good ball against the same two good balls used in the previous weighing and compare to see if the ball is heavier or lighter. (3 weighings) If they are not equal then determine if the B group is currently heavier or lighter. Go to step 6. 6. Switch either B2 or B3 with B1. Let's say we replaced B2 with B1. If the weighing is now equal then B2 is the odd ball out. If the weighing is still unequal then B3 must be the ball. Thus we have used a total of only 3 weighings. Since we made note of the weighing in step 5 we know if the odd ball is heavier or lighter. 7. Now if the 1st weighing (between group A and C) was unequal then we need to determine which is the bad group. Thus we need to weigh one of them against group B (which we know is correct) and then proceed with the steps 2-6. So in this case it is one extra weighing which brings a worst case total of 4 weighings. I hope everything made sense. I don't think its possible to get it in 3 AND also find whether the odd ball is lighter or heavier. One thing is for sure: I would have never solved it during the interview since this took way more than 5 min to figure out. I believe the answer is 2. Step 1: Before weighing anything, you separate the balls into groups of three. Step 2: Put one group of three on one side of the scale, and the other group of three on the other side of the scale, leaving still one other group of three somewhere on the side. ---visualization ooo /\ ooo <--------1st weighing ooo <------side group Step 3: If the scale is balanced that means that the heavier ball is in the side group. At this point, you would weigh any two of the remaining three balls. Again, if the scale is balanced, then you know that the only ball left is the heaviest one. If the scale tips to any particular side, on the other hand, then you know that the heavier ball is on that side. Up to this point the number of weighings is 2. Step 4: if on your first weighing with three balls on each side, the scale tips, then your next weighing will be of any two of the three balls which were on the tipping side of the scale. Again.. if the scale is balanced, then the remaining ball must be the heaviest. And if the scale tips to a side, then you know that side has the heaviest ball. Up to this point the number of weighings is also 2. Therefore the minimum number of weighings is 2. You obviously can get away with 1 weighing, but only if you are lucky; weighing 4 against 4 and hoping that the other ball (not weighed) is the heavier one. Otherwise, starting out weighing 4 against 4 will lead to 3 weighings, therefore that solution is not the optimal one. Even starting out with a 2 against 2 scheme, you can have up to 3 weighings until you are absolutely sure of which ball is the heaviest. So, optimally, you will be weighing 3 balls against 3, and the least amount of times you would have to weigh the balls to know for sure which one is heaviest is 2. In lieu of the fact that we don't know whether the ball is heavier or lighter then the rest, you would have to do 3 weighings. 1: ooo/\ooo ooo Do the first weighing as pictured above to isolate the set of balls that you know for a fact weigh the same. Then, in the second weighing, use that set to isolate the set that contains the odd ball. The second weighing should also tell you whether the odd ball is heavier or lighter because of how the scale reacts when you replace the control set with the unknown set. If the scale stays tipped down to the side opposite the control set, then it's heavier. If it stays tipped up, then it's lighter. If the scale was balanced before the second weighing, then you know that the remaining set is the set that has the odd ball, and replacing it with a set that you know all weigh the same should still tell you whether the ball is heavier or lighter by watching how the scale behaves. Then you can proceed to the 3rd weighing to isolate the heavier/lighter ball. So my mistake everyone -- the correct answer is 3 weighings when you don't know if the ball is heavier or lighter. Show More Responses I had this interview question this morning. Those of you who say it has no bearing on determining character are wrong. An arrogant person will present their answer, right or wrong, and say that they are done and it is perfect. It takes humility to consider that your first answer may be wrong, and the interviewer will want to see your process for checking that your answer is correct. Remember, it is the path you take to get to the answer that is more important than getting the answer right. Given 3 step, divide the balls into 3 groups A, B, C, Not knowing which has the heavier or the lighter ball, #1 Step: scale A vs B, If it balanced then we already know that C has the different weight.(but we still dont know if the ball is heavier or lighter. If it did not balance we will know that the OTHER ball is maybe in group A or B. (Note: e.g. A raises and B dropped) #2 Step: scale A vs C, If it balanced then we will know that the OTHER ball is in group B. If it did not balance e.g A raises and C dropped. we now conclude that C and B has the same weight and the OTHER ball is lighter #3 Step: Using the group A ball. scale the 2 balls, if they balance they we will know that the 3rd ball is the one that is different. if it did not balanced then the side where the ball raises is the OTHER ball because from step 2 we already notice that the ball is Lighter. Problem solved! Divide the 9 balls into groups of 3 3 - 3 -3 take first 2 groups on the scale. If they balance out: Take the last group of 3 Divide the last group into 1 - 2 Take the 2 (above) one each of the scale. If they balance out, then the '1' is the heavier one else u get the heavier one. Number of scale measurements required = 2 Balance 4 vs 4, - if balance the excess 1 is the lightest or the heaviest. Don't mind which is the heaviest nor the lightest since the question is OR - you can just have one answer. the minimum would be two. First ball and second ball either one would weight more... since they are asking the "minimum'... if they asked for the maximum then it will take 8 times. |

### Programmer Analyst at Goldman Sachs was asked...

How many square feet of pizza is eaten in the US each year? 27 Answers800 billion Sq.ft A pizza is roughly 1 sqft. If the average american eats 1/3 of a pizza and eats pizza 3 times a month, that would mean 12sqft a year. Times 200M americans that gives you 2.4 billion sqft. Sorry, i must be stupid. I didn´t know pizza were made of feet. Show More Responses 2.4 billion These market estimation questions are pretty common in IB and consulting; so this one is not an oddball. The critical part is the logical reasoning used to estimate rather than how accurate you are. Try these: how many diapers used everyday in Canada how many commercial planes are currently flying in US air space All of them. Pizza is not served in square feet in the U.S. If i know & see it right, Pizza's are not square in shape so sq feet is not the correct UOM (Unit of measure). Pl correct ur question in terms of circle/diameter/radius & I shall revert with the answer. Trust your question is answered. Too many Unless i am going for a pizza delivery or pizza marketting job which Goldmann Sachs is not, i would blatantly say would either of us care? Need Input How the hell would I know ? Let me do some research and get back to you on it. MOST PIZZA IS SEVED IN THE SHAPE OF TRIANGLE (FOR A SLICE) OR IN THE SHAPE OF A CIRCLE - NEED TO DO SOME RESERACH AND THEN SOME MATH. LET ME GET BACK TO YOU ABOUT IT. Show More Responses Way to much lousy square feet - that's for sure. Hungry ? What's your favorite pizza there Bossman ? You buy - I'll fly. Whadya say ? pie r squared Not enough. Assume average pizza is 16", or 8" radius. That is 0.66 feet. Square it and mulitply by 3.1 to about (0.4)*3.1 = 1.2 ft^2. Assume 100 million families in US eating one pizza 10 times a year (this is the weakest assumption) = 100,000,000*10*1.2 = 1.2 billion square feet of pizza, +-0.3 billion. $38 billion Annual pizza sales in America, according to Pizza Today 3 billion Number of pizzas sold in the U.S. each year, according to NAPO 350 Slices of pizza sold every second, according to NAPO 46 Slices of pizza the average American eats each year, according to Packaged Facts 23 Pounds of pizza the average American eats each year 93 Percent of Americans who eat pizza at least once a month 70 Percent of Super Bowl viewers who eat at least one slice during the game 251.7 million Pounds of pepperoni Americans consume each year 36 Percent of pizza orders that specify pepperoni as a topping 70,000 Number of pizzerias in the U.S., according to Pizza Today 24 Percent of those pizzerias owned by Pizza Hut, Domino's, or Papa John's 9,000 Number of pizzerias in New York 17 Percent of restaurants in America that are pizzerias, according to Food Industry News 40,010 Number of subscribers to Pizza Today, the leading pizza industry magazine 150 million square feet - Math is not the answer to your question - Google is. http://bit.ly/MoP5xR Well, I consume about 400 square ft by myself so... There are none, because I was live at Indonesia If I wanted the job, I'd say I would research the answer directly. If not found, I would use whatever statistics I can find. An example would be: (# of pizza's sold) times (average sq feet per pizza) times (average ratio of pizza eaten vs thrown away) If I didn't want the job, I'd say "I'm going to research this, then leave for the day, score some good acid, return 24 hours later and make up a number". Around 30 Million in India Show More Responses The answer is none. Pizza is sold by volume. The correct unit of measure for volume is cubic feet, not square feet. You cannot eat something that has no volume. Pizza eaters population * size of pizza in square feet Answer is zero, or at least it can't be answered. Question said "US" - not U.S. US is not a measurable subject (whose US?) Question did not ask United States (U.S.) because there was no punctuation marks in their subject US. There's about 320m people in the US who live to about age 80. That means there are 4 million people at each age. I would say prime pizza years are about age 10 through age 60, which is a range of 50 years, meaning about 200 million people eat pizza regularly. I assume that people, on average, eat pizza twice a month, meaning that there are 200m * 24 = 4.8 billion instance of pizza eating every year. The service size for pizza is about a quarter of a pie, a pie has a diameter of about 2 feet, meaning pi/4 or about 0.75 square feet of pizza are eaten per sitting. The area of pizza eaten in the US every year is about 4.8b * 0.75 = about 3.75 billion square feet. According to this website, 3 billion pizzas are sold every year in the US. http://www.statisticbrain.com/pizza-statistics/ I might be off by a factor of 3 or so in my answer depending on the average size of a pizza, but I am pretty close all things considered. That is how you answer these questions, people. |

### Quant at Jane Street was asked...

suppose you have a perfectly round disk. You put three legs randomly on this disk to form a table. Supposing the legs are perfectly perpendicular to the disk and are attached to the disk firmly, what is chance that the table will not fall when you flip the disk or in other word when you put the table to stand on its legs? 23 Answers3/4? 2/9 1/4 Show More Responses I got 1/4th, can you guys post how you got your answers? 1/4 is correct 1/2, if three legs cover > 180 degrees, the table can stand. heres what I did. I cut the circle into quarters and then said that the table will not stand if all 3 legs are in the same half of the circle. there is (1/2)^3 odds of putting all 3 legs in the same half, and 4 different halfs (top half, bottom half, left half, and right half) for this to happen. --> 1 - 4 * (1/2)^3 = 1/2 anyone see a problem with this? I don't really understand why you said there are 4 different halfs. You could have have cut the circle up into eights and then there are 8 halfs. You could have cut the circle up into 10000ths and then argued that there are 10000 halfs. The way I think you are supposed to do it is this. Place the first leg, it doesn't matter where you place it. Now, what is the chance that the 2nd and third leg are on the same half as the first leg. So, it's 2C2 * (1/2)^2 = 1/4. Chance of this not happening = 3/4. What am I missing? I think its 1/2 also. Same reasoning as the comment above, but I think the 1st AND 2nd leg can be anywhere, because there is no established "half" until there are 2 legs on the table. The only place the 2nd leg cant be is exactly 180 degrees away from the 1st (the probability of which is about 0, because 179.9 degrees in either direction is already fine). So the probabilty of all 3 legs being on the same half is 1 x 1 x 1/2 Why not think the opposite from the beginning? What is the probability that it could not stand? It means that the legs are in the same half circle. 3*(1/2)*(1/2) = 3/4 Then the answer is 1/4 Brett, why are you multiplying by 3...the odds that the three are on the same side is as follows 1 peg can go anywhere. 50% chance that the next peg is on the same side and another 50% chance that the 3rd peg is on the same side therefore shouldn't it be (1/2)*(1/2) = 1/4 chance that the table falls (aka all pegs on the same side) and there fore probability that the table stands is 1-1/4 = 3/4 so isn't 3/4 your final answer n/360, where n is the angle of the 2 legs Ok, here is mine, the first one is always not a problem, so let's jump to the 2nd stand In order to drop, the second must lie inside the half circle with the 1st one so, however, if you think of that in the clockwise and anti clockwise location, you will immediately discover that where ever it is, the 2nd is some how within the 180degree ranges. So, the problem leads to the third stand. So, if you can see the big picture, it is not hard to realized that there is only one safe zone for the 3rd stand, which is the opposite region of the one between 1st and 2nd (say 2nd located at n), so, the probability of it being dropped will be n/360 if using only integers => 1- n/360 being the right answer (to me). And if you sum up all the probabilities and combination, you will soon see that 1/2 is the right answer. Hope it can help! Show More Responses Sorry, it is 3/4 It's 1/2. 1/pi * integral from 0 to pi (x/pi) Fix a leg. Join this point to the opposite side of the disk to split the circle into half. If both legs lie in the same half it will topple. Effectively what is the probability of two coins the same in two tosses. We have HH,HT,TH,TT so 1/2. It will stand 1/2 of the time. The answer is 1/4. The answer is not 1/2. It's not 1/2, and it's not 1/4. Salalah had it right. Draw a circle. Draw the epicenter. Draw your first random leg (any point). Draw a line from it, through the epicenter, and to the circumference (your line will be longer than the radius). Draw a second leg (any point). Draw a line from it, through the epicenter, to the circumference. Your third leg needs to fall in the resulting pie piece. The probability of it falling there will be the the angle from point 1 to the epicenter to point 2, divided by 360 degrees. I believe it is the same with cutting the circle 3 times and probability that all of the pieces are smaller than 0.5* circumference because in my opinion, table will stand if the center of mass is inside of the triangle made by three cut. If one of the pieces is bigger than the 0.5, then the triangle could not capture the center so the answer is 1/4. 1/4. here is how to get the answer mathematically: angles between every two legs: x,y,z then x+y+z=2pi and restrictions are 0<x<2pi 0<y<2pi 0<x+y<2pi this forms a closed triangle area if it stay stable, Then restrictions are 0<x<pi 0<y<pi pi<x+y<2pi another closed triangle ratio between areas of two triangles :1/4 I got 1/4 https://answers.yahoo.com/question/index?qid=20110714233431AA3yVDg 1. Let the center be O 2. The 1st leg is at A --> AO cuts the circle at A1 and A2, with A1 being on the other side of A w.r.t O 3. The 2nd leg is at B --> BO cuts the circle at B1 and B2, with B1 being on the other side of B w.r.t O 4. The 3rd leg is at C. In order that the table doesn't fall, C has to be in the pie OA1B1 5. Let the angle AOB be phi 6. The probability that the table doesn't fall is phi / 2pi 7. Since A and B are uniformly distributed within the circle, the expected value of phi is \int_{0}^{pi} phi * dphi = pi^2 / 2 8. --> the probability that the table doesn't fall is : pi^2 / 2 / 2pi = pi / 4 Am I wrong any where ? |

### Intern at Jane Street was asked...

If you had only 5 and 11 cent stamps. Whats the smallest number that would be impossible to make with those stamps. 12 Answers49 i think i dont really remember now. I think you phrased that wrong bud And I think it's 39 Show More Responses Can anyone restate the question in a non-ambiguous manner? 5*11-5-11=39 (Frobenius number) how bout 1? The problem seems to be the Postage Stamp Problem (look it up!). In this case, it is "what is the largest number which you cannot obtain by a combination of 5 or or 11 value postage stamps?" (implicit in the question is the fact that after a certain value, you can obtain every value by such a combination) As someone said above, it is 39 for these particular numbers. 40, 45, 55, etc. are all multiples of 5. 41 is 11 + 8*5, 42 is 2*11 + 4*5, etc. Basically once you can obtain 40-44, you can obtain 45-49 by adding 5, and then you can obtain 50 or higher by adding 10, and so forth. Why doesn't 17 work? starting with 11c, you can make 16c, 21c, 26c, etc by adding 5c each time, or all numbers congruent to 1 mod 5 is makeable. Do the same starting from 22c, and 33c. At this point, all numbers congruent to 0, 1, 2, 3, mod 5 are makeable. Once you start at 44c, all numbers congruent to 4 mod 5 are makeable, so the answer is the 4 mod 5 number below 44, which is 39. Well, isn't 39 the *largest* number the postage stamp can't make? I used a 15 by 15 Sieve and got 39 as the answer. The question is supposed to be: what is the largest number that cannot be generated by adding fives and elevens. To solve the problem, consider what is the minimum number with the last digit as 0, 1, 2,..., 9 that can be generated by adding fives and elevens: Last digit Minimum Achievable Maximum Unachievable 0 10 0 1 11 1 2 22 12 3 33 23 4 44 34 5 5 NA 6 16 6 7 27 17 8 38 28 9 49 39 Hence, maximum unachievable = 39 |

### Trader at Jane Street was asked...

What is the sum of the digits of all the numbers from 1 to 1000000? This is different from the sum of the numbers. For instance the sum of the numbers from 1 to 10 is 55 whereas the sum of the digits is 46. 16 AnswersThe main idea is that if you write all the numbers from 0 to 999999 down as six digit numbers (possibly prepending zeros) then all digits appear the same number of times. So, its digit appears exactly 6 x 1000000/10 = 600000 times. so the result is 600000x 45 +1 (+1 for the number 1000000) Maybe I'm reading it wrong, but isn't the sum of the digits of 1-10 just 11? 1 digit for 1-9, 2 digits for 10-99? So it's 9+90*2+900*3+9000*4+90000*5+900000+6 no, I think the easy way to solve it in your head is to remember that when adding all digits 1 to 100, you have 50 pairs: 1+100, 2+99, etc. Each pair is 101, times 50 is 5050. 1 to 1000 would be 500500 so 1 to 1,000,000 would be 500,000,500,000 Pretty cool, huh? Show More Responses scott, dude you should add digits not the numbers, so 99+2 = 18+2 =20. not 101 Scott's answer from May 24 is the correct way to think about it if summing the numbers. The answer is 27,000,001 - if you do it programatically the operation is a simple map reduce - simply map a digit sum function across the list of values [1, 1000000] and then reduce an addition operator across the result. Python Proof: >>> sum(map(lambda n: sum(map(int, str(n))), xrange(1, 1000001))) 27000001 21085156 Don't mind the above answer. I read the question wrong. Each digit will appear 1+10+100+1000+10000+100000 times. so the answer is 111,111*45+1=4444440+555555+1=4999996 nb is right. Another way you can think about it easily is if you want the digits from 1 to 1,000,000 then each digit should appear 1/10 * 1,000,000 times. So 100,000 x 6 (for each place value) x 45 (the sum from 1 to 9) + 1 (for the 1 million) 27,000,001 I think John Doe is right. 27,000,001 is what I got. Think of each number as a 6 digit number. The average number each digit could be from 000,000 to 999,999 is (9+0)/2=4.5. Since the average of each number is 4.5 and there are 6 digits the average sum of the digits for a 6 digit number should be 4.5*6=27. There are 1 million numbers from 000,000 to 999,999 so the sum of the digits from 000,000 to 999,999 is 27,000,000. Subtract the digits of 000,000 which is just 0 and add the digits of 1,000,000 which is just 1 to get 27,000,001. For arbitrary a=1,...,9 accounts the how many a's appear in the six digit number. 1 * C(6,1)*9^5 + 2* C(6,2)*9^4 + 3 * C(6,3) * 9^3 + 4*C(6,4)*9^2 + 5*C(6,5)*9 +6*C(6,6) = 600000. 600000*(1+2+3+...+9)= 27000000. Then add the 1 from 1000000. The ans is 27000000. Show More Responses 2.7 x 10^7 + 1 general rule: to 10^n answer is 10^n * n * 4.5+1 here n=6, result is 27 000 001 1-1000000 same as sum of digits in 0 - 999999 then plus 1, treat 0 - 999999 as a 6 digit random number, then the digit of sum is sum of digit for each number: 1000000*(4.5*6)=27000000, so answer is 27000001. |