Oxbridge interviews

Computer Science interview problems

Puzzles and algorithms: find a method, then show it is the best. Type your thinking, take a hint when you are stuck, then answer the follow-ups.

The problems

  1. The heavy coin

    Free

    You have 9 coins that look the same. One is slightly heavier. With a balance scale, what is the smallest number of weighings that always finds it?

    Try it free
  2. Climbing stairs

    In the rehearsal

    You climb a staircase of 10 steps, taking 1 or 2 steps at a time. How many different ways are there to reach the top?

  3. Guess my number

    In the rehearsal

    I think of a whole number from 1 to 1,000. You may ask yes or no questions. How many questions do you need, in the worst case, to be sure of finding it?

  4. A hundred lockers

    In the rehearsal

    A corridor has 100 closed lockers. Person 1 opens every locker. Person 2 toggles every 2nd locker, person 3 every 3rd, and so on up to person 100. Which lockers are open at the end?

  5. The missing number

    In the rehearsal

    A list holds every whole number from 1 to n except one, in a random order. How would you find the missing number, using very little extra memory?

  6. Does the robot escape?

    In the rehearsal

    A robot starts at (0, 0) facing north on an endless grid. F moves it one square forward, L and R turn it 90° left or right on the spot. It repeats the program FFRFFL forever. Does it stay inside some fixed region, or wander off?

  7. Knights and knaves

    In the rehearsal

    On an island, knights always tell the truth and knaves always lie. A says: 'B is a knave.' B says: 'A and I are the same kind.' What are A and B?

  8. Tower of Hanoi

    In the rehearsal

    Three pegs, and n discs of different sizes stacked on the first peg, largest at the bottom. Move them all to the third peg, one disc at a time, never putting a larger disc on a smaller one. How many moves does it take?

Rehearse all 8

Hints, follow-ups and Mia's marks on every attempt, until 31 December.

Oxbridge Interview Rehearsal: two subjects

£199 once. No VAT is charged.

Rehearse every problem in two subjects you choose, with hints, follow-ups and Mia's marks, until your interviews.

  • All 8 problems in each of your two subjects, chosen after you pay
  • Hints when you are stuck, then the tutor's follow-up questions
  • Mia's marks on every attempt: thinking aloud, using hints, checking, reasoning
  • Your next problem picked from your weakest skill
  • Every attempt saved, with re-attempts side by side

Access until 31 December 2026. Choose your subjects after paying. Full refund within 14 days, for any reason.

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

Oxbridge Interview Rehearsal: all subjects

£299 once. No VAT is charged.

Every problem in all seven subjects, for joint courses and for practising beyond your own subject.

  • All 56 problems: Maths, Computer Science, Engineering, Physics, Economics, Law and PPE
  • Hints when you are stuck, then the tutor's follow-up questions
  • Mia's marks on every attempt: thinking aloud, using hints, checking, reasoning
  • Your next problem picked from your weakest skill
  • Every attempt saved, with re-attempts side by side

Access until 31 December 2026. Full refund within 14 days, for any reason.

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

What the universities say