Job preparationIQ and puzzles
IQ and logic puzzles — interview questions with answers

Handshakes, burning ropes, the river crossing, Monty Hall — the puzzles IT boards set, with their solutions.
Plenty of companies drop a puzzle into the middle of the technical questions. The point is not to embarrass you — it is to see how your reasoning holds up under pressure.
Not knowing the answer is fine. Keep saying how you are approaching it. Going silent is the only genuinely wrong answer here.
The questions
There are 10 people in a room and everyone shakes hands with everyone else. How many handshakes are there in total?
What to coverThis tests counting and combinatorics. (Answer: 45 — that is 10 x 9 / 2.)
A pair of glasses and its case cost $50 together. The glasses cost $49 more than the case. What does each cost?
What to coverA standard test of arithmetic and care. (Answer: glasses = $49.50, case = $0.50.)
You have two ropes, each of which burns for one hour but at an uneven rate. Using a single match, how do you measure 45 minutes?
What to coverThis tests reasoning about time. (Answer: light the first rope at both ends and the second at one end. The first burns out at 30 minutes; light the second rope's other end at that moment, and it burns out 15 minutes later — 45 in total.)
A farmer must cross a river with a wolf, a goat and a cabbage. The boat holds only the farmer and one item. How does he get all three across safely?
What to coverThis tests problem solving and logical thinking. (Answer: take the goat over first; come back for the wolf, and bring the goat back; leave the goat and take the cabbage over; finally return for the goat.)
A room has four corners, with a cat in each corner. Each cat sees the other three cats. How many cats are in the room?
What to coverThis tests careful reading and simple counting. (Answer: 4.)
Three boxes hold apples, oranges, and a mixture of both. All three are labelled wrongly. Taking just one fruit from one box, how do you label them all correctly?
What to coverThis tests logical and analytical thinking. (Answer: take a fruit from the box labelled "apples and oranges". Because every label is wrong, that box holds only what you drew, and the other two labels follow from it.)
You have a 3-litre and a 5-litre bucket. How do you measure exactly 4 litres?
What to coverThis tests logical thinking and problem solving. (Answer: fill the 5-litre and pour into the 3-litre, leaving 2 litres. Empty the 3-litre, move the 2 litres into it, refill the 5-litre and top up the 3-litre — which takes 1 litre, leaving exactly 4 in the 5-litre bucket.)
You are somewhere where people are either always truthful or always lying. You may ask one yes-or-no question. What do you ask to find out which you are speaking to?
What to coverThis tests logical thinking. (Answer: ask something whose answer you already know — "Is two plus two four?" A truth-teller says yes; a liar says no. Asking "are you telling the truth?" does not work, because both would answer yes.)
Someone stole your hat and put it in a box. The box reads "the hat is in this box." Is the box telling the truth or lying, and why?
What to coverThis tests reasoning about self-reference. (Answer: for the puzzle to hold, the box is lying — a box that told the truth would not be the one hiding the hat.)
Three doors hide a car and two goats. You pick one, and the host opens a different door to reveal a goat. He offers you the switch. Should you take it?
What to coverThis is the Monty Hall problem, and it tests probability and decision-making. (Answer: switch. Switching wins with probability 2/3, staying with your first door only 1/3.)
Two cars set off towards each other between two cities, one at 60 km/h and one at 80 km/h. If the cities are 140 km apart, where do they meet?
What to coverThey are moving towards each other, so their closing speed is 60 + 80 = 140 km/h. Covering 140 km takes 1 hour. In that hour the first car travels 60 km. (Answer: 60 km from the first city, 80 km from the second.)
A train 100 m long travels at 50 km/h. How long does it take to cross a bridge 150 m long?
What to coverThe train has to clear the bridge plus its own length, so the distance is 100 + 150 = 250 m. Its speed is 50 km/h = 50 x 1000 / 3600 ≈ 13.9 m/s. (Answer: 250 / 13.9 ≈ 18 seconds.)
Two numbers add to 100 and multiply to 1000. What are they?
What to coverWith x + y = 100 and xy = 1000, the equation is x² − 100x + 1000 = 0, giving 50 ± 10√15. (Answer: about 88.73 and 11.27 — note that these are not whole numbers. If this happens in an interview, say so; catching that is part of the answer.)
Two pipes fill a tank: pipe A in 3 hours, pipe B in 6 hours. How long do they take together?
What to coverIn one hour pipe A fills 1/3 of the tank and pipe B fills 1/6. Together that is 1/3 + 1/6 = 1/2. (Answer: 2 hours to fill it.)
Two clocks both read 12:00 PM. One gains 2 minutes a day and the other loses 3 minutes a day. How far apart are they after 3 days?
What to coverOver three days the first clock gains 3 x 2 = 6 minutes and the second loses 3 x 3 = 9 minutes. (Answer: they are 6 + 9 = 15 minutes apart.)
A porter carries clay pots, each weighing 4 kg with a 1 kg counterweight. If the pots and counterweights weigh 20 kg in total, how many pots are there?
What to coverEach pot is 4 kg and its counterweight 1 kg — 5 kg per set. At 20 kg total, 20 / 5 = 4. (Answer: 4 pots.)
What is the angle between the hour and minute hands at 3:15, and at 3:45?
What to coverAt 3:15 the minute hand is at 90° and the hour hand at 90 + (15 x 0.5) = 97.5°, so the gap is 7.5°. At 3:45 the minute hand is at 270° and the hour hand at 90 + (45 x 0.5) = 112.5°, a gap of 157.5°. (The rule worth remembering: the hour hand moves 0.5° per minute.)
A journey of 120 km is covered at 60 km/h for the first half and 80 km/h for the second. What is the average speed?
What to coverTaking it as two halves of 60 km, the times are 60 / 60 = 1 hour and 60 / 80 = 0.75 hours, so 1.75 hours in total. (Answer: average speed = 120 / 1.75 ≈ 68.6 km/h. Note it is not 70, the plain average of 60 and 80 — that is the trap.)
Adding up all the page numbers in a book gives 3066. How many pages does it have?
What to coverThe first n page numbers sum to n(n+1)/2, so 3066 would need n(n+1) = 6132. But 77 x 78 = 6006 and 78 x 79 = 6162 — neither fits. (Answer: no whole number of pages sums to exactly 3066; the nearest is 78 pages, which sums to 3081. Knowing the formula and spotting the mismatch is the real answer here.)
A company announces a 10% pay rise. If an employee currently earns $2000, what is the new salary?
What to cover10% of 2000 is 200. (Answer: the new salary is 2000 + 200 = $2200.)
How many unique 6-character passwords can be made from 26 letters?
What to coverEach of the 6 positions can hold any of the 26 letters. (Answer: 26⁶ = 308,915,776 — a little over 300 million. This is exactly why short passwords are weak.)
A bag holds 3 red, 4 blue and 5 green balls. How many ways are there to draw two balls?
What to coverThe bag holds 3 + 4 + 5 = 12 balls. The ways of choosing 2 from 12 is 12 x 11 / 2. (Answer: 66 possible pairs.)
A school has twice as many boys as girls. If there are 300 students in total, how many of each are there?
What to coverIf there are g girls then there are 2g boys, and g + 2g = 300. (Answer: 100 girls and 200 boys.)
A box holds 10 red and 15 green balls. Drawing one at random, what is the probability it is green?
What to coverThere are 10 + 15 = 25 balls, 15 of them green. (Answer: the probability is 15/25 = 3/5, or 60%.)
Two trains leave a station in opposite directions, one at 80 km/h and one at 120 km/h. How far apart are they after 3 hours?
What to coverGoing in opposite directions, the distance grows at the sum of the speeds: 80 + 120 = 200 km/h. (Answer: after 3 hours, 200 x 3 = 600 km.)
Two themes must be chosen from five for a website. How many possibilities are there?
What to coverChoosing 2 from 5 where order does not matter: 5 x 4 / 2. (Answer: 10 ways.)
A company decides to lay off 60% of its staff. If it has 1000 employees, how many are laid off?
What to cover60% of 1000 is 1000 x 0.6. (Answer: 600 people.)
Two angles of a triangle are 45° and 55°. What is the third?
What to coverThe three angles of a triangle always sum to 180°, and 45 + 55 = 100. (Answer: the third angle is 180 − 100 = 80°.)
What interest does $5000 earn at 4% over 2 years?
What to coverSimple interest = principal x rate x time = 5000 x 0.04 x 2. (Answer: $400. Compounded it would be 5000 x 1.04² − 5000 = $408 — worth asking which the interviewer means.)
Two numbers multiply to 180 and add to 27. What are they?
What to coverWith x + y = 27 and xy = 180, the equation is x² − 27x + 180 = 0. (Answer: 15 and 12.)
A train crosses a 100 m bridge in 30 seconds. What is its speed?
What to coverThe train's length is not given, so working from the 100 m bridge alone: 100 / 30 ≈ 3.33 m/s. (Answer: about 12 km/h. In an interview, state the assumption you are making out loud — that is the mark of a good answer.)
A car travelling at 60 km/h reaches its destination in 2 hours. How long would it take at double the speed?
What to coverTwo hours at 60 km/h means a distance of 120 km. Double the speed to 120 km/h and the time halves. (Answer: 1 hour.)
A room has four lights, each either on or off. How many combinations are there?
What to coverEach light has 2 states and there are 4 lights, so 2⁴ = 16 states in total. (Answer: 16 combinations are possible, of which exactly one is "all on".)
A rope burns through in 12 hours. How do you measure exactly 6 hours?
What to coverLight the rope at both ends at once. Burning from both directions, the two fronts meet at exactly half the time. (Answer: 6 hours. The neat part is that this works even though the rope does not burn evenly.)
A sack holds 10 kg of sugar. Taking out 1 kg at a time, how many times must you draw from it?
What to coverTaking 1 kg at a time out of 10 kg empties the sack in 10 goes. (Answer: 10 times.)
A car starts at 60 km/h and gains 5 km/h every hour. What is its speed after 3 hours?
What to coverIt starts at 60 and gains 5 each hour, so over 3 hours it gains 15. (Answer: 60 + 15 = 75 km/h.)
A bag holds 10 balls, 6 red and 4 blue. Drawing two, what is the probability both are red?
What to coverThe ways of choosing 2 reds from 6 is 15, and of choosing any 2 from 10 is 45. (Answer: the probability is 15/45 = 1/3.)
A company has three departments: A with 30% of staff, B with 45%, and C the rest. If department A has 150 people, how many staff are there in total?
What to coverDepartment A is 30% of the total and holds 150 people, so the total is 150 / 0.30. (Answer: 500 employees.)
Two numbers add to 100 and differ by 40. What are they?
What to coverWith a sum of 100 and a difference of 40, the larger is (100 + 40) / 2 and the smaller (100 − 40) / 2. (Answer: 70 and 30.)
What is the total after investing $2000 at 5% a year for 2 years?
What to coverSimple interest is $100 a year, so $200 over two years. (Answer: $2200 in total. Compounded it would be 2000 x 1.05² = $2205.)
A staircase has 15 steps and you climb 1 or 2 at a time. In how many different ways can you climb it?
What to coverThis is the Fibonacci sequence: the ways of climbing n steps = the ways for (n−1) + the ways for (n−2). That runs 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987. (Answer: 987 ways. This is a dynamic programming question wearing a disguise.)
A team has 4 men and 3 women. One man and one woman must be chosen as captains. How many possibilities are there?
What to coverOne of 4 men and one of 3 women — two independent choices, so multiply. (Answer: 4 x 3 = 12 ways.)
One machine does a job in 10 days and another in 15. How long do they take together?
What to coverIn a day the first machine does 1/10 of the job and the second 1/15; together 1/10 + 1/15 = 1/6. (Answer: 6 days.)
A book has 200 pages with 300 words on each. How many words in total?
What to cover200 pages x 300 words. (Answer: 60,000 words.)
A company invests $10000 at 5% a year. What interest does it earn over 3 years?
What to coverSimple interest is 10000 x 0.05 = $500 a year, so $1500 over three years. (Answer: $1500. Compounded it would be 10000 x 1.05³ − 10000 ≈ $1576.)
A room has 5 doors and a person may enter through any of them. In how many ways can the room be entered?
What to coverEach door is one distinct way in. (Answer: 5 ways. The question is easy, but people rush and multiply — it is testing attention.)
A school has boys and girls in a 3:2 ratio. If there are 500 students, how many of each?
What to coverA ratio of 3 : 2 means 5 parts in all. 500 / 5 = 100, so one part is 100 people. (Answer: 3 x 100 = 300 boys and 2 x 100 = 200 girls.)
A swimmer moves at 4 km/h against the current and 6 km/h with it. How fast is the current?
What to coverSpeed with the current = the swimmer's own speed + the current; against it = own speed − current. So the current is (6 − 4) / 2. (Answer: the current runs at 1 km/h and the swimmer's own speed is 5 km/h.)
A box holds 5 apples and 7 oranges. Drawing two, what is the probability of getting one apple and one orange?
What to coverThe ways of picking one apple and one orange is 5 x 7 = 35, and the ways of picking any 2 from 12 fruit is 66. (Answer: the probability is 35/66, about 53%.)
A town has 500 people, 60% of them men. How many women are there?
What to coverIf 60% are men then 40% are women, and 40% of 500. (Answer: 200 women.)
A company's profit rises 20% one year and falls 10% the next. What is the net change?
What to coverThe first year multiplies by 1.2, the next by 0.9 — so 1.2 x 0.9 = 1.08 overall. (Answer: 8% higher than where it started. Note that up 20% then down 10% is not up 10% — that is the trap in this one.)
A bag holds 5 red, 4 blue and 3 green balls. Drawing two, what is the probability they match in colour?
What to coverSame-colour pairs: 10 red + 6 blue + 3 green = 19. Total pairs: 66. (Answer: the probability is 19/66, about 29%.)
One machine finishes a job in 6 hours and another in 8. How long do they take together?
What to coverIn an hour the first machine does 1/6 of the job and the second 1/8; together 7/24. (Answer: 24 / 7 ≈ 3 hours 26 minutes.)
A car covers 80 km in 2 hours at 40 km/h. How long would it take at double the speed?
What to coverAt 40 km/h, 80 km takes 2 hours. Double the speed to 80 km/h and the time halves. (Answer: 1 hour.)
A room has 3 tables and 4 chairs. How many chairs go at each table?
What to cover4 chairs do not divide evenly among 3 tables — 4 / 3 is not a whole number. (Answer: they cannot be shared equally; one chair each leaves one spare. The board is watching whether you notice the condition is impossible — guessing a number is the wrong answer.)
Tips for this round
- Do not answer immediately; take a moment. The answer that arrives first is usually the trap.
- Test with small numbers — try three people instead of ten and see whether your rule holds.
- Once you have it, restate the steps to make sure.
- Some of these have no clean answer at all — noticing that is also a correct answer.