Skip to main content
Cambridge Computer Science interview preparation

Free Interview Resources

Cambridge Computer Science Interview Questions and Mock Interviews

Free practice questions, preparation advice, and expert insights for Computer Science interviews at Cambridge.

1-2 interviews usually · problem-solving conversationFormat
Discuss a Mock Interview →

Start with our admin team. Tell us your course and interview plans so we can help you find a suitable tutor.

In short

Most applicants have 1 or 2 Computer Science interviews lasting 35 minutes to an hour in total, and each College decides whether they are online or in person. They are problem-solving conversations that may include your personal statement, and the problems usually need mathematical knowledge but nothing outside the school curriculum.

Reviewed 28 October 2026 against official university sources.

Sample Cambridge Computer Science Interview Questions

Real Computer Science interview questions in the style Cambridge asks. Try answering each one aloud before you reveal the hint.

01

An array holds six numbers, written a[1] to a[6], and at the start every entry is 1. Procedure P is: for i taking the values 2, 3, 4, 5, 6 in that order, replace a[i] by a[i] + a[i-1], using the current value of a[i-1] (so including any change already made during this run). Run P three times in a row and write down the array after each run. What do you notice? Predict the last entry of the array after a fourth run, then check it. Finally, say what would change if the loop took i in the order 6, 5, 4, 3, 2 instead, and why.

Problem-Solving

entry

Hint

Draw six boxes and update them one at a time, left to right, being careful about which values are old and which are new.

02

A server farm has 5 identical processors. Three jobs arrive, and each is sent independently and at random to one of the 5 processors, all equally likely. Find the probability that (a) all three jobs go to different processors, (b) exactly two of the jobs share a processor and the third goes to a different one, and (c) all three go to the same processor. Check that your three answers account for every possibility. Then say how you would find the probability that four jobs all land on different processors.

Problem-Solving

entry

Hint

Count the equally likely outcomes first: in how many ways can three labelled jobs be sent to five processors?

03

Seven machines stand along a corridor. Measured in metres from the entrance, each machine can be inspected only from a certain stretch of the corridor, with both end points included: machine 1 from 1 to 4, machine 2 from 2 to 6, machine 3 from 3 to 5, machine 4 from 7 to 9, machine 5 from 8 to 12, machine 6 from 10 to 13, machine 7 from 11 to 12. An engineer standing at one spot can inspect every machine whose stretch contains that spot. What is the fewest number of spots from which all seven machines can be inspected? Give a set of spots that works, and explain how you know that fewer spots would not be enough. Then describe a rule that you could give a computer for finding the fewest spots for any list of stretches.

Problem-Solving

mid

Hint

Sketch the seven stretches as bars on a number line and try to find a good set of spots by hand before you look for a rule.

04

A rain gauge is read once a day for 9 days in a row, and each reading is a whole number of millimetres (zero is allowed). Show that, whatever the nine readings are, some run of one or more consecutive days has a total that is a multiple of 9. Then show that the same claim can fail if there are only 8 days of readings.

Problem-Solving

mid

Hint

Try some sets of readings by hand, including awkward ones such as every reading being 1, and see which runs of days come out as multiples of 9.

05

A floor strip is 2 cells tall and n cells long. It is to be covered completely, with no overlaps, using dominoes and square tiles. A domino covers two neighbouring cells and may be placed upright (covering the two cells of one column) or flat (covering two neighbouring cells of one row). A square tile covers a 2 by 2 block of cells. Let a(n) be the number of different ways to cover the strip. Find a(1), a(2) and a(3) by hand. Then find a rule that gives a(n) in terms of earlier values, and use it to work out a(6). Finally, explain why a(n) roughly doubles each time the strip grows by one cell in length, and try to make 'roughly doubles' precise.

Problem-Solving

mid

Hint

Draw all the tilings for n = 1, 2 and 3 first, and see how the tilings for larger n are related to the ones for smaller n.

Invitation → Decision: the interview timeline

Interview invitation

Mostly November

College interviews

7 to 18 December 2026

Outcome

27 January 2027

Problem-Solving

2 questions
01

In a network of servers, every server has exactly three direct links to other servers. No pair of servers is joined by more than one link, and no server is linked to itself. One link is critical: if it fails, the network splits into two parts with no route between them. Show that such a network must have at least 10 servers. Then describe a network with exactly 10 servers that meets all of these conditions.

hard

Hint

Pick one of the two parts that the network splits into and study it on its own, as a small network in its own right.

02

A display shows a whole number from 0 to 11 and counts like a clock face, so that after 11 it goes round to 0. It starts showing 0. Button X adds 4 to the display and button Y adds 6, going round past 11 when needed. The buttons can be pressed in any order and as often as you like. (a) Which numbers can the display ever show? (b) A second display shows the numbers 0 to 14 (fifteen numbers) and starts at 0, with one button that adds 6 and one that adds 10. Which numbers can this display ever show? (c) Can you state a rule that works for any display size and any two button amounts, and explain why it is correct?

hard

Hint

Start by pressing buttons on the first display and writing down every number you can reach, then look for something that the reachable numbers have in common.

Conceptual & Discussion

5 questions
01

Here is an attempted proof by induction that 2^n is at most n^2 + 1 for every whole number n from 1 upwards. Base case: for n = 1, 2^1 = 2 and 1^2 + 1 = 2, so the claim holds. Step: suppose that 2^k is at most k^2 + 1 for some k. Then 2^(k+1) = 2 times 2^k, which is at most 2k^2 + 2. Now 2k^2 + 2 is at most k^2 + 2k + 2, which equals (k+1)^2 + 1, because k^2 is at most 2k. So the claim holds for k + 1, and by induction it holds for all n. Check the claim for n = 1 to 6. Something has gone wrong: say exactly where the argument fails, and why. Can you then find a similar inequality that you can prove correctly by induction?

entry

Hint

Check the claim for the first few values of n before you read the argument line by line.

02

In decimal, 0.375 means 3 tenths, 7 hundredths and 5 thousandths. In the same way, the binary fraction 0.011 means 0 halves, 1 quarter and 1 eighth, which makes 3/8. (a) Write 5/16 as a binary fraction. (b) Start to write 1/10 as a binary fraction, and explain why the expansion never ends. (c) Which fractions, written in lowest terms as a whole number over a whole number, have binary expansions that end? (d) Computers keep only a limited number of binary digits for each number. What does this suggest about storing a length of 0.1 metres?

entry

Hint

To test 1/10, try to build it from halves, quarters, eighths and so on, one binary place at a time, keeping track of what is left over.

03

A machine reads a word made of the letters a and b, one letter at a time, starting in state S. The rules are: in state S, reading a moves to P and reading b stays in S; in state P, reading a stays in P and reading b moves to Q; in state Q, reading a moves to P and reading b moves to R; in state R, reading either letter stays in R. The machine accepts a word if it finishes in state R. (a) Which of the words bab, aabb, ababb and abab does it accept? (b) Describe in plain English exactly which words it accepts, and say what each of the states S, P and Q remembers about the letters read so far. (c) Why does reading a in state Q lead to P and not back to S? (d) How would you change the rules so that it accepts exactly the words containing aab?

mid

Hint

Run the four words through the machine, writing down the state after each letter, and look at what the accepted words share.

04

Seven rooms stand in a row, numbered 1 to 7, and each holds some people. Whenever a room holds 2 or more people, two of them may leave it together, one walking into each neighbouring room. At an end of the row, the person who would have walked beyond room 1 or room 7 leaves the building and is lost. The process continues for as long as some room holds 2 or more people, and you may choose which such room to empty next. At the start, room 4 holds 6 people and the other rooms are empty. (a) Carry out the process and find the final arrangement. (b) Explain why the process must always stop, whatever choices are made. (c) Would a different order of choices ever give a different final arrangement? Explain your answer.

hard

Hint

Do part (a) twice, choosing different rooms to empty along the way, and compare what stays the same and what changes between the two runs.

05

A long corridor has 5 switches in different places, and all of them control one light. A rule says, for each of the 32 ways in which the five switches can be set up or down, whether the light is on. The rule must satisfy this requirement: flipping any single switch, whichever it is and whatever positions the others are in, always changes the light from on to off or from off to on. (a) Describe a rule that meets the requirement, and say what happens to the light if two different switches are flipped one after the other. (b) How many different rules meet the requirement? Justify your answer. (c) Explain why the rule 'the light is on when at least three of the five switches are up' does not meet the requirement.

mid

Hint

Start with just two switches, list the four settings, and see how much freedom you really have in choosing the light's state for each one.

Personal Statement

3 questions
01

You mention a program, game or small tool that you have written. What does it take in, what does it produce, and how did you check that it gave the right answers? If I gave it an unusual input, what do you think would happen?

entry

Hint

Pick one concrete example input and walk through what your program does with it, step by step.

02

You mention a maths or puzzle problem that you spent a long time on. What did you try that did not work, what made you change your approach, and can you state the general idea behind the eventual solution without using the specific numbers?

mid

Hint

Begin by describing the first approach you tried and say exactly where it broke down.

03

You mention an algorithm or technique that you have read about, such as a way of searching, sorting or finding routes. Explain what problem it solves and roughly how the work it does grows as the input gets larger. Then describe an input on which it would do far more work than usual, and say whether a different method would suit that case better.

hard

Hint

Choose a small input of size 4 or 5, count the basic steps by hand, and then ask what happens to the count when the size doubles.

Curveball

3 questions
01

A password is exactly 8 characters long and each character is a lowercase letter. A program can test a million passwords every second. Roughly how long would it take to try every possible password? Then compare two ways of making the password harder to find by trying everything: making it two letters longer, or allowing digits as well as lowercase letters in each of the 8 places. Which helps more, and by roughly what factor?

mid

Hint

Replace 26 by a number that is easier to raise to a power, and check how much error that introduces.

02

Ten people are given 1000 exam scripts in a random order and asked to put them into alphabetical order by surname as quickly as they can. They have a large room and plenty of tables. How would you organise the ten people? Roughly how much faster than one person working alone could they finish, and what stops them from being ten times faster?

mid

Hint

Think about how you would sort a hundred scripts on your own, and which steps could be done at the same time by different people.

03

A test rig has three dials, each set to a digit from 0 to 9. One click turns a single dial to the next digit up or the next digit down, and 9 and 0 count as neighbours, so one click from 9 goes to 0. The rig starts showing 000, and a technician wants to put it through all 1000 possible settings. (a) Why does this need at least 999 clicks? (b) Show how to do it in exactly 999 clicks, so that no setting is repeated. (c) Can the route be a loop, so that one more click after the last new setting brings the rig back to 000 and the whole route takes 1000 clicks? (d) Explain why your method would still work with four dials, or with any number of dials.

hard

Hint

Start with a rig that has just two dials and find a route through all 100 settings, then think about how to extend it by one more dial.

12+ weeks

Build a mathematical base

  • Revise the A-level mathematics you know well, especially algebra, sequences and series, functions, inequalities and proof.
  • Work through short counting and probability problems on small cases, writing every step out in full.
  • Learn to prove simple statements by induction and by contradiction, and practice explaining each step in words.
  • Read the department's interviews page and note what it says about how to prepare.
  • Start a notebook of problems you could not solve, with notes on where you got stuck.

6-12 weeks

Reason about procedures and algorithms

  • Trace short pieces of pseudocode by hand, keeping a table of the values after each step.
  • Explain in plain words why a procedure gives the right answer, and say what stays the same on every pass of a loop.
  • Work on graph, pigeonhole and recurrence problems, starting with the ones on this page.
  • Try writing a small program in any language you like, if you enjoy it, then explain how it works aloud.
  • Look at the TMUA preparation materials, since every Computer Science applicant takes the TMUA before interview.

2-6 weeks

Talk problems through aloud

  • Practice the questions on this page out loud, saying what you are trying before you calculate.
  • Give yourself about ten minutes on a problem, then talk through where you were stuck.
  • Ask a teacher or friend to give hints rather than answers, so that you get used to being nudged in a new direction.
  • Reread your personal statement and prepare to explain anything you mention in it from first principles.
  • Check the pages of the Colleges you are considering to see whether they set the CSAT, which Peterhouse and Trinity do, and try the sample tests if so.

1-2 weeks

Mixed practice and review

  • Mix topics within each practice session, so that you have to decide which idea to use.
  • Return to the problems in your notebook and solve them again without looking at your notes.
  • Practice with someone who interrupts to ask why, so that explaining feels like a conversation.
  • Prepare a short plain-words explanation of two or three ideas from your reading or projects.
  • Check your own College's information on the number and length of interviews and on whether they are online or in person.

The week of

Logistics and rest

  • Check the time and place or online link in your invitation, and plan how to get there or connect.
  • Test your device, internet connection and a quiet space, if your interview is online.
  • Set out pen, paper and a glass of water, ready for the day.
  • Sleep well, eat regular meals and take a walk each day.
  • Stop working on new problems and trust the practice you have already done.

Unlock the full guide

  • The full Computer Science question bank, by category, with hints
  • A week-by-week preparation roadmap
  • The common mistakes that cost offers - and how to avoid them

Free Resource

The Complete Cambridge Computer Science Interview Guide

Enter your email to unlock the full question bank, worked approaches, a week-by-week prep roadmap, and the mistakes that cost offers.

No spam. Unsubscribe anytime.

2027 entry

How Cambridge interviews work this year

Cambridge holds its main interview period from 7 to 18 December 2026. Most applicants have one or two interviews, lasting 35 minutes to an hour in total, and Cambridge says applicants find out the outcome on 27 January 2027.

  • -The main interview period runs from 7 to 18 December 2026.
  • -Most invitations are sent in November, though some go out in early December.
  • -Most applicants have one or two interviews lasting a total of 35 minutes to an hour.
  • -Each college decides whether its interviews are in person or online: Churchill, Emmanuel, King's and Selwyn interview everyone in person.
  • -Cambridge says applicants find out the outcome of their application on 27 January 2027.
  • -Winter pool interviews take place around mid to late January 2027.

Checked against official university sources on 26 October 2026: Cambridge: interviews, Cambridge: dates and deadlines. Your invitation email has the details for your own course and college.

Mock interviews

How your Cambridge Computer Science mock interview works

Real length, real questions and strict marking, with a rotating panel of Oxford and Cambridge interviewers, so the real interview is never the first time you face someone new.

01

Real conditions

Two interviews of 25 to 30 minutes in one hour, with a strict cut-off. Standard questions, unseen material and real past interview questions we keep for our mock interview students.

02

A rotating panel

On the day you meet people you have never seen before. So you meet a different interviewer each time, never more than four mocks with the same person, and nothing is asked twice.

03

Strict marking

Every interview is scored on the same three criteria and written up on a feedback sheet in your portal, so you can see exactly where you are improving and what to fix next.

What we mark

  • 50%

    Academic thinking

    Breaking an unfamiliar problem down, testing ideas, using what you know in a new setting and spotting where an assumption fails.

  • 30%

    Communication

    Thinking out loud, stating your assumptions, answering the question actually asked and making good use of a hint.

  • 20%

    Resilience under pressure

    Not whether you are nervous, but whether you recover: after a correction, a dead end or a deliberately vague question.

How to start

  1. Tell us your course, your colleges and two or three times that suit you.
  2. We match you with an interviewer for your course and confirm who it is.
  3. You have two full interviews, live feedback, then the written sheet in your portal.
  4. Each next mock picks up where the last one left off.
Discuss a mock interview →

Some of our Computer Science interviewers

Some of the best at Oxford and Cambridge: a First with Distinction and a Part III ranked 5th of 284.

  • Computer Science

    MEng, First with Distinction, Cambridge, and a PhD in Computer Engineering

  • Computer Science

    First in Computer Science, Cambridge

  • Richard

    Computer Science

    First in Engineering (MEng) and a PhD, Cambridge, machine learning and information engineering

  • Computer Science

    5th of 284 Part III

    Part III Mathematics with Distinction, Cambridge, ranked 5th of 284

Interviewers are confirmed with you before each session. Oxbridge Mentors is not affiliated with the University of Oxford or the University of Cambridge.

Watch & Learn

Cambridge Computer Science Interview Videos

A Cambridge Interview: Queens' Computer Science

Gives a picture of how a Computer Science interview conversation can run.

Computer Science interview at Cambridge | Sidney's virtual interviews miniseries

From Sidney Sussex College, useful for hearing the style of questioning and how a conversation moves.

Cambridge Computer Science interview experiences and advice

Interview experiences and advice from the CambridgeComputerLab channel, helpful for hearing how others approached preparation.

All videos are the property of their respective creators.

Further Reading

Recommended Resources

Website

Department: Computer Science interviews page

by University of Cambridge Department of Computer Science and Technology

Sets out College-by-College interview lengths, what happens and how to prepare, with embedded videos and links to problem-solving resources.

Website

University: what to expect at your Cambridge interview

by University of Cambridge

General guidance on what to expect at a Cambridge interview, though it is not specific to Computer Science.

Website

Department: admissions FAQs

by University of Cambridge Department of Computer Science and Technology

Answers common questions about the TMUA, the CSAT, the value of A-level Computer Science, the languages taught and programming experience.

Website

Department: super-curricular activities for Computer Science applicants

by University of Cambridge Department of Computer Science and Technology

Suggests personal projects, programming problem sites, Bebras and Cipher Challenge, online courses, books, magazines and YouTube channels for reading around the subject.

Website

TMUA preparation materials (UAT-UK)

by UAT-UK

Provides past-style TMUA papers in two parts, Applications of Mathematical Knowledge and Mathematical Reasoning, which matters because every Computer Science applicant takes the TMUA before interview.

Website

CSAT information and four official sample tests (Climb Foundation)

by The Climb Foundation

Gives information on the CSAT, which Peterhouse and Trinity set, and four sample tests of written reasoning problems published by the Climb Foundation rather than the University.

Website

Practice+ (CSAT sample questions with hints and solutions)

by The Climb Foundation

Provides sample CSAT questions with hints and solutions, which the department interviews page points to as preparation.

Website

Mathematical problem-solving links on the department interviews page

by NRICH

A set of maths problems linked from the department interviews page, useful for building reasoning, though they are problem sets and not interview questions.

Frequently Asked Questions

Most applicants have 1 or 2 interviews lasting 35 minutes to an hour in total, but the College sets the number and the lengths. For example, Gonville and Caius run two 25-minute Computer Science interviews and Churchill run one of 30 to 40 minutes.
Each College decides whether its interviews are in person or online. Churchill, Emmanuel, King's and Selwyn interview all applicants in person, so check what your own College says.
Every Computer Science applicant takes the TMUA, which is pre-registered and taken before interview, and the department says there is typically no pass or fail mark and that all parts of the application are considered holistically. Peterhouse and Trinity also set the CSAT, an additional written assessment taken on the interview trip. Apart from these tests, no submitted written work is usually required.
The University says interviews look at your ability to think critically and independently, your readiness to study at a high academic level, and your curiosity and openness to new ideas. The department adds that the way you go about solving a problem matters more than the answer.
Problems usually need mathematical knowledge but nothing outside the school curriculum, and the University says mathematics is the main focus of preparation, with A-level Further Mathematics highly recommended where available. No prior programming is expected: the course teaches Java, ML and Prolog and does not expect you to know them on arrival.
An interview may include a discussion of your personal statement and your motivation, so be ready to explain anything you wrote from first principles. Choose a few things you have read, built or tried, and practice describing what you learned and what you would try next.
Taking time to think before you start is fine, and the department says interviewers give hints if you are stuck or heading the wrong way. Say what you have tried, test a smaller case, and treat a hint as a new way in rather than a sign that you have failed.
Talk through each problem aloud as you solve it, as the department advises, and write out every step. You are not expected to finish every problem, so practice the process as much as the answer, and return to the questions you could not finish.

Get Expert Cambridge Computer Science Interview Coaching

Two full interviews in an hour, strict marking and a written feedback sheet, with Oxford and Cambridge graduates.

Discuss a mock interview →