# 9 tricky brain teaser questions tech engineers struggle to answer at job interviews

Tech engineers are some of the smartest people in the world.

But even they have a hard time answering the brain teaser questions a lot of tech companies like to ask during job interviews.

We went through Glassdoor to find some of the trickiest brain teaser questions they get asked, and the best way to answer them.

Disclosure: Jeff Bezos is an investor in Business Insider through hispersonal investment company Bezos Expeditions.

### Systems engineer at Google: 'How many trailing zeros are in the number 5! (5 factorial)?'

'5!=120. So there is 1 trailing zero.'

'This sounds like one geared not so much towards getting the right answer, but getting to it the right way. If you think a bit and say 'one', the interviewer will know you did it the brute-force way, doing the maths. You'd get at the answer faster, and probably impress them more, if you think instead how many times a ten will be produced in doing that maths, rather than what the actual result of the maths will be.'

### Manager at Amazon: 'If you had 5,623 participants in a tournament, how many games would need to be played to determine the winner?'

Getty Images / John Ferry
Suggested answers: 'The interviewer is not looking for the right answer because there can be many. What he/she is looking for is your logical approach in solving the answer. So you could start by probing more is first I would like to understand if 5,623 participants represent the number of team or individuals. Then ask the next logical question based on the answer.' '5,622. Assuming it is a single elimination tournament. All teams lose one game except the champs. It's always # of teams - 1.'

### Software Development Engineer in Test at Webtrends: 'There are 20 different socks of two types in a drawer in a completely dark room. What is the minimum number of socks you should grab to ensure you have a matching pair?'

Shutterstock

'I'm not a mathematician, statistician, or highly analytical but if you pick up 3 socks they could still be all the same type - even if the odds are 50%. Odds do not equal reality. So the only way to 'ensure you have a matching pair' is to pick up 11 of the 20. This is the only fool proof guaranteed way to get a pair (in the real world and not the world of odds).'

### Web Technology Intern at Riot Games: 'Imagine that you have three boxes, one containing two black marbles, one containing two white marbles, and the third, one black marble and one white marble. The boxes were labelled for their contents - BB, WW, BW - but someone has switched the labels so that every box is now incorrectly labelled. You are allowed to take one marble at a time out of any box, without looking inside, and by this process of sampling you are to determine the contents of all three boxes. What is the smallest number of drawings needed to do this?'

Ilike

'The key thing here is that the box does not contain what it says on the label. As such you can guarantee the contents of each box with one draw. Here's how: Draw a marble from the box labelled BW (since it is labelled BW it must be either BB or WW) If you draw a white for example you know 100% that it is the WW box. Then there are only two boxes left labelled WW and BB in this example and the only two things that they can be are BB or BW. The box labelled BB cannot be BB and so hence must be the BW. This leaves the box labelled WW to be BB by elimination. Same thing works if you pick a black marble first. The key is picking from the BW box in the start and confirming what it actually is. One draw is the smallest number needed.'

### Software engineer at D. E. Shaw & Co.: '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)?'

Wikimedia Commons

'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.'