Quant interviews often contain questions or puzzles involving mathematics, statistics, and logic. The goal of these questions is to assess your quantitative and reasoning abilities, which can be highly relevant to working as a quant analyst, trader, or developer. Here are 7 clever quant interview questions of varying difficulties – how many can you solve?

## 1. Trailing Zeros (easy)

How many trailing zeros does 1000! have?

##### Solution to #1

249 trailing zeros

A trailing zero is added whenever a number is multiplied by 10. To figure out how many factors of 10 there are, just figure out how many factors of 2 and 5 there are (whichever is fewer).

It’s easy to see that a factorial contains many more factors of 2 than factors of 5, so we just need to figure out how many factors of 5 there are.

1 out of every 5 numbers in the factorial is a factor of 5. However, factors of 25 contains two factors of 5, so they need to be counted twice, and so on for other powers of 5.

So there are:

- 1000 / 5 = 200 factors of 5
- 1000 / 25 = 40 factors of 25
- 1000 / 125 = 8 factors of 125
- 1000 / 625 = 1.6 factors of 625 (which rounds down to just 1 factor, 625 itself)

200 + 40 + 8 + 1 = 249

## 2. Sum of 4’s and 5’s (medium)

How many numbers from 1 to 1000 (inclusive) can be written as the sum of some number of 4’s and/or 5’s? For example, 4 + 4 + 5 + 5 + 5 = 23.

##### Solution to #2

994

A good way to solve this:

- Recognize that all multiples of 5 are possible.
- All numbers that are 1 less than a multiple of 5 are possible, by switching out one of the 5’s for a 4.
- For example, 30 = 5 + 5 + 5 + 5 + 5 + 5, so 29 = 4 + 5 + 5 + 5 + 5 + 5.

- By that logic, all numbers between multiples of 5 should be possible, by switching out up to four of the 5’s for 4’s.
- However, this does not work if there are not enough 5’s to switch out for 4’s – which is only true if there were fewer than four 5’s in the sum. So now we know all numbers 15 or greater can be written as the sum of 4’s and 5’s.
- If we just inspect the numbers from 1 to 14, we see that 6 of them cannot be written as the sum of 4’s and 5’s: 1, 2, 3, 6, 7, and 11. Hence 994 of the numbers from 1 to 1000 can be written as the sum of 4’s and 5’s.

## 3. Deducing Bicycle Spokes (medium)

You know that a bike shop has some unusual bikes – their bikes are identical, and each bike’s front and back wheels has at least one spoke each, but front and back wheels may (or may not) have different numbers of spokes. You know there are between 200 and 300 spokes in total in the shop, but you don’t know how many bikes.

If you were told the exact number of spokes, you would be able to figure out the number of bikes. Unfortunately, you do not know the exact number of spokes, but just knowing that you could figure it out with this information is sufficient for you to deduce the answer. How many bikes and spokes are there?

##### Solution to #3

17 bicycles with 17 spokes each.

The key is knowing you could figure out the number of bicycles if you knew the total number of spokes:

- For example, if the number of spokes was 220, there could be 11 bicycles with 20 spokes each or 20 bicycles with 11 spokes each. This means the number of spokes on each bike must be equal to the number of bikes (or in other words, the total number of spokes must be a perfect square).
- However, even if the number of spokes were a perfect square, let’s say 225, there could be 15 bicycles with 15 spokes each, or 5 bicycles with 45 spokes each. But since each bicycle has at least 2 spokes (two wheels with at least one spoke each), this ambiguity is resolved if the number of spokes per bike was a prime number.

17 is the only prime number whose square (289) is between 200 and 300.

## 4. Handshake Puzzle (hard)

Hasan and Lauren attended a dinner party with 4 other couples. Since some people already knew some of the other guests, every person at the dinner party shook hands with every person they had not met before (the dinner party was not during a pandemic!).

Lauren noticed that everyone else (excluding Lauren herself) ended up with a different number of handshakes!

Can you figure out how many people Hasan shook hands with?

##### Solution to #4

Hasan shook hands with 4 people.

There were 9 people other than Lauren, and each person had to have met one other person already (since each person was part of a couple). So if everyone except Lauren had a different number of handshakes, that means there were people that shook hands 0, 1, 2, 3, 4, 5, 6, 7, and 8 times – let’s call them Person 0 through Person 8 based on how many people they shook hands with.

- Person 8 shook hands with every person except their partner. That means Person 0 is their partner, since everyone else must have shaken hands with at least one person (Person 8).
- Person 7 shook hands with every person except their partner and Person 0. That means Person 1 is their partner, since everyone else must have shaken hands with at least two people (Person 8 and Person 7).
- Continuing this logic, we know Person 6 and Person 2 must be a couple, Person 5 and Person 3 must be a couple, and Person 4 and another Person 4 must be a couple.
- But since Lauren noticed everyone else had a different number of handshakes, Lauren must be one of the Person 4, and so Hasan must be the other Person 4.

## 5. Odd Hourglasses (easy)

You have two odd hourglasses: one that times exactly 4 minutes and one that times exactly 7 minutes. What is the best way to measure exactly 9 minutes using just these two hourglasses?

##### Solution to #5

There are several possible solutions. Here is a straightforward one:

- Start both hourglasses at the same time.
- When the 4-min hourglass runs out, immediately flip it over.
- When the 7-min hourglass runs out, the 4-min hourglass should now have exactly 1 min of sand left. Immediately flip it over to start measuring the 9 min.
- Let the 1 min run out, then flip over and let the 4-min hourglass run out twice more, for a total of 1 + 4 + 4 = 9 min.

Here is another, which doesn’t involve wasting 7 minutes before you start:

- Start both hourglasses at the same time, and start measuring the 9 min.
- When the 4-min hourglass runs out, immediately flip it over.
- When the 7-min hourglass runs out, the 4-min hourglass should now have exactly 1 min of sand left. Immediately flip both hourglasses over.
- When the remaining 1 min of the 4-min hourglass runs out, the 7-min hourglass should have accumulated exactly 1 min of sand at the bottom. Immediately flip it over to measure the last 1 min.

## 6. First to 100 (medium)

You and a friend play “first to 100”, a game in which you start with 0, and you each take turns adding an integer between 1 and 10 to the sum. Whoever makes the sum reach 100 is the winner.

Is there a winning strategy? If so, what is it?

##### Solution to #6

Yes, the first player should add 1, then after each of the second player’s turns, add the integer that will bring the sum to exactly 12, 23, 34, 45, 56, 67, 78, and 89. In other words, if the second player adds *x*, the first player should add 11 – *x*.

To figure out this strategy, work backwards from 100:

- Leaving the sum at 90-99 means you lose, because the other player can immediately reach 100.
- But this means leaving the sum at 89 guarantees a win, because the other play will be forced to leave the sum at 90-99 afterward.
- Using this same logic, 78 also guarantees a win, and any number of the form 11
*n*+ 1.

## 7. Fake Coins Proof (hard)

You are a rare coins expert and have determined which 7 out of 14 gold coins are fake, but now you need to demonstrate to the judge which ones are fake.

It is known that that real coins all weigh the same, fake coins all weigh the same, and fake coins weigh less than real ones (but are otherwise identical).

Using a traditional double-pan balance scale just 3 times, how can you prove exactly which of the 14 coins are fake?

##### Solution to #7

- Put 1 fake coin on the left and 1 real coin on the right. The scale will be heavier on the right, so the left coin must be fake and the right coin must be real (if they were both real or both fake, the balance would show both sides were equal).
- You have proven 1 fake and 1 real coin. Keep these coins on the scale.

- Add 2 real coins to the left and add 2 fake coins to the right. The scale will now be heavier on the left (2 real + 1 fake > 1 real + 2 fakes), and this is only possible if you added 2 real to the left and 2 fake to the right – any other combination of additional coins would have resulted in the scale being balanced or heavier on the right.
- Now you have proven 3 fake and 3 real coins.

- Put the 3 proven fakes on the left and 3 proven real coins on the right. Add 4 real coins to the left and add 4 fake coins to the right. The scale will now be heavier on the left (4 real + 3 fakes > 3 real + 4 fakes), and this is only possible if you added 4 real to the left and 4 fake to the right – any other combination of additional coins would have resulted in the scale being balanced or heavier on the right.
- Thus you have proven exactly 7 coins to be real and 7 coins to be fake.

Looking for more? Brain Easer has dozens of **interview brain teasers**, with detailed solutions.

If you want to learn more about brain teaser interviews, check out our **guide to brain teaser interview questions**.

## 4 replies on “7 Quant Interview Questions and Answers”

For #3, if we are told that there are 289 spokes, couldn’t we also have just 1 bike with 289 spokes?

Fair question. The wording being plural (“bikes”) indicates that there is more than one bike, but that is admittedly a little subtle.

In an actual interview, you could just ask the interviewer a question like this and they would clarify.

For 7 how do you put 1 fake coin on the left, if you dont know which one the fake coin is…

The premise of question #7 is that you know which ones are fake, you just need to prove it to everyone else. I can see how the original wording (“have determined there are 7 fake coins out of 14 gold coins”) didn’t fully convey this – it has now been adjusted (“have determined which 7 out of 14 gold coins are fake”). Thanks!