See All PhotosGoogleEngaged EmployerGoogleAdd an InterviewAbout34,476Reviews3,693JobsMoreOverviewCompany OverviewOrganization StructureFAQ34,476Reviews3,693Jobs66,083Salaries16,204Interviews8,745Benefits566PhotosFollow+Add an InterviewInterview QuestionData Analyst Interview-GoogleIf you have 10 bags of marbles with 10 marbles each and one bag has marbles that weigh differently than the others, how would you figure it out from one weighingAnswerAdd TagsFlag as InappropriateFlag as InappropriateInterview Answers6 Answers▲15▼Assume all marbles are from 10g and the heavier one is 11g Take 1 marble from bag1 ,2 from bag2, 3 from bag3, 4 from bag4, 5 from bag5, 6 from bag6, 7 from bag7, 8 from bag8, 9 from bag9,10 from bag 10..and weigh them together Let it be W. So if bag5 contains the heavy marbles The total weight (W) will be 10+20+30+40+55+60+70+80+90+100 = 555. where as if all were of 10g it should have been 550. meaning the bag which is heavy will always be MeasuredWeight - 550 Mathematically if bag X is the one which is heavy, X can be found using one weighing of sample (W) - (N(N+1)/2)Aneesh Soman on Oct 3, 2016Flag as InappropriateFlag as Inappropriate▲4▼Terribly worded question; you never specified that we are given the normal and heavy weights. Without that information, the votes up solution here doesn’t work.Anonymous on Oct 19, 2017Flag as InappropriateFlag as Inappropriate▲1▼Using a series sum [N(N+1)/2], will not work in this case, as we've not been provided with enough specifics (such as "whats the standard weight of the marbles?). In fact any solution dependent on summed weight will have overlapping solution space and fail. Consider if the standard weight is 10 ounce per marble, and bag 1 is the exception at 12 ounce per marble, for a total weight of 552. Now consider if bag 2 is the exception at 11 ounce per marble - also for a total weight of 552. There is no way to distinguish between the two cases. Given the setup, if appears the interviewer did expect the answer to use some variation of summed series, and I suspect the poster has paraphrased the question and missed some key language - and as best I can tell is not solvable as stated. Google will expect you to provide a generalized solution that can be automated, so the "add the bags one at a time", while simple and clever, would probably not be acceptable as a "weigh only once" solution, and if accepted would be a lesser answer as it does not provide a code-able business solution.DLE on Mar 27, 2018Flag as InappropriateFlag as Inappropriate▲5▼hmm, drop all the bags a the same height spread out and see which bag make the biggest mark on the ground.Anonymous on May 14, 2013Flag as InappropriateFlag as Inappropriate▲18▼Add bags one at a time to scale. Should be the same increment of weight added until you add the bag that adds a weight value different from all the others.Meredith Jensen on Jan 26, 2015Flag as InappropriateFlag as Inappropriate▲1▼hint: use the number of stones to code for each bag.Zhenjie Zhang on Oct 2, 2016Flag as InappropriateFlag as InappropriateInterviews>GoogleAdd Answers or CommentsTo comment on this, Sign In or Sign Up. Google CareersWe strive to provide Googlers and their loved ones with a world-class benefits experience, focused on supporting their physical, financial,... – MoreWhere we workBuilding belongingGoogler storiesBuild your future This is the employer's chance to tell you why you should work for them. The information provided is from their perspective.