Cambridge Computer Science Interview
Expert support from Leading Tuition
Get the Computer Science pack — £180Expert support from Leading Tuition
Get the Computer Science pack — £180Imagine you're asked, mid-interview, to design an algorithm that determines whether a sequence of brackets is valid — and then, before you've finished, the interviewer changes the constraints. This is not an unusual experience in a Cambridge Computer Science interview. The question itself is rarely the point. What the interviewer wants to see is how you think when the ground shifts beneath you: whether you slow down, reason carefully, and engage with the new problem rather than panic or retreat into silence. Candidates who prepare for Cambridge Computer Science interviews as though they are preparing for a quiz will find themselves wrong-footed. Those who prepare to think — out loud, rigorously, and with genuine curiosity — are the ones who leave with offers. Building that kind of reasoning under pressure is what the Computer Science pack, £180, is for — ten questions in algebra, proof and complexity, each carried through to a full worked answer.
Cambridge Computer Science is one of the most mathematically demanding undergraduate courses in the country. The interview reflects this. Interviewers — typically two academics, often including your potential supervisor — are not checking whether you have memorised content. They are assessing your mathematical reasoning, your ability to handle abstraction, and your intellectual resilience when a problem resists easy answers.
What distinguishes the very best Cambridge Computer Science candidates is not speed or confidence, but precision and adaptability. A candidate who says "I'm not sure, but if I assume X, then the structure of the problem becomes..." is demonstrating exactly the kind of thinking Cambridge values. A candidate who gives a fluent but shallow answer, or who falls silent when pushed, is not — regardless of how impressive their predicted grades are.
Computer Science has an expert pack, not a free sample
The Computer Science expert pack works through algorithmic problems, complexity, proof and discrete mathematics with worked model answers and technique notes from specialist subject tutors, for £180. There is no free Computer Science sample — the free samples cover nine other subjects and show what the pack format looks like.
Get the Computer Science packCambridge Computer Science interviews also reward genuine curiosity. If you have read beyond the A-level syllabus — explored complexity theory, played with formal logic, or built something that required you to think algorithmically — that intellectual texture comes through. It is not about name-dropping; it is about the quality of engagement you bring to problems you haven't seen before.
The following questions are representative of the kind of problems Cambridge Computer Science interviewers use. They are not trick questions, but they are not straightforward either. Each one rewards careful decomposition and honest reasoning over rushed answers.
When you encounter a question like these, your first instinct should be to think aloud from the very beginning — not after you have worked out the answer privately. Interviewers want to follow your reasoning, not just receive a conclusion. If you are uncertain, say so explicitly and explain what you do know. If you spot a special case, name it. If you realise mid-answer that your approach has a flaw, correct it openly. This is not weakness; it is exactly the intellectual honesty Cambridge is selecting for.
For worked examples with detailed reasoning, see our Cambridge Computer Science interview questions with algorithm and mathematical reasoning model answers, which walks through problems of this type in depth.
The questions above have no answer you can look up
Which is why reading them only helps so far. Cambridge Computer Science interviews reward a candidate who proposes something imperfect, is shown the flaw, and improves it — a sequence that needs a second person to exist at all.
The Computer Science expert pack, £180, sets out the problems with worked model answers that include the imperfect first attempt and the improvement after it — the sequence Cambridge is actually watching for. Computer Science has no free sample; the nine subjects that do have one show the format.
None of the six questions above is answered on this page — that list only shows the kind of opening move an interviewer makes. Below, the first of them gets the same treatment the pack gives its own ten: the plain question, the hints an interviewer offers once a first answer stalls, and a full suggested answer that starts from an idea good enough to say out loud and does not survive.
How would you determine whether two binary trees are structurally identical? What if the values also had to match?
The instinctive first move is to sidestep recursion altogether: walk each tree with an in-order traversal, collect the values into a list, and compare the two lists. It is quick to describe and easy to code, and it looks at first as though it settles both halves of the question together, since two equal lists seem to mean two equal trees.
It fails on a direct counterexample. Take a small tree where the root has two children: root 2, left child 1, right child 3. Its in-order traversal — left subtree, then the node, then right subtree — visits 1, then 2, then 3. Now take a completely different shape: a chain with root 1, whose only child is a right child 2, whose only child is a right child 3, so no node anywhere has a left child. Walking that chain in-order also visits 1, then 2, then 3, because at every node the empty left subtree contributes nothing before the node itself is visited. Two trees of visibly different shape produce an identical list. A traversal only records the values in left-to-right order; it discards exactly the branching structure the question is asking about.
What survives is a method that compares the two trees directly, node against node, without flattening either one first. If both current nodes are empty, that pair matches. If exactly one of the two is empty, the shapes have already diverged and the answer is no — stop there. If both exist, recurse on the two left children and the two right children, and require both recursive calls to succeed. That check alone answers the shape-only version of the question. Turning it into the values version needs exactly one addition: before recursing, also require the two nodes’ own values to be equal. The recursive comparison of left-against-left and right-against-right is unchanged; the values check is the only difference between the two questions asked.
Run this method on the two counterexample trees and it is caught immediately: the balanced tree’s root has a left child, the chain’s root does not, so the very first pair compared already has one side empty and one side not — correctly reporting that the trees differ, which is exactly what the traversal method got wrong.
On cost: each pair of corresponding nodes is visited once, and the recursion stops the moment a mismatch appears. When the two trees really are identical, every node in both has to be visited, so the worst case is proportional to the total number of nodes, O(n). A mismatch is usually caught earlier than that — but the running time of an algorithm is defined by its worst case, and that case belongs to the pair of trees that turn out to match.
The traversal idea is not a poor thing to say out loud — it is a fast, concrete first move, and it gives an interviewer something to react to. What separates a strong answer from a weak one is not whether that first idea survives; almost none of them do on the first try. It is whether, handed the chain-versus-two-children counterexample, the candidate can see immediately why it breaks the method and rebuild from the actual reason it failed, rather than reaching for a memorised fix. Saying “traversal order” and stopping there answers nothing. Being shown the counterexample and explaining, unprompted, why comparing values in one dimension can never recover branching in two, is the part being scored. The pack’s own ten questions get the same three-part treatment, on problems that start in algebra and proof rather than in trees — the Computer Science pack, £180.
Cambridge requires applicants for Computer Science to sit the TMUA (Test of Mathematics for University Admission), taken in October before interviews. The TMUA assesses mathematical reasoning and the application of mathematical knowledge — two skills that are directly relevant to what you will face in the interview room.
A strong TMUA score does not guarantee an interview, but a weak one can close the door before you reach that stage. More importantly, the habits of mind the TMUA demands — working precisely under pressure, reasoning about unfamiliar mathematical structures, checking your logic rather than your intuition — are the same habits your interviewers will be looking for. Preparing seriously for the TMUA is therefore not separate from interview preparation; it is part of the same process. Candidates who treat the two as distinct often find their interview performance reflects the gaps in their mathematical reasoning that the TMUA exposed.
Effective preparation for a Cambridge Computer Science interview has several distinct components, and it is worth being deliberate about each one.
You can also browse our wider collection of Cambridge Computer Science interview questions and model answers to build familiarity with the range of problems that appear across different colleges.
On format: most Cambridge Computer Science applicants have two interviews, typically at their chosen college, though some candidates are also interviewed at a second college. Each interview usually lasts between 25 and 40 minutes and is conducted by two academics. The interviews are almost always problem-based rather than personal statement-led, though your personal statement may prompt a question about something you claimed to have read or explored.
If you are also considering other institutions, our Oxford Computer Science Interview preparation page covers how that process differs.
The most damaging mistake is silence. Candidates who stop talking when they hit difficulty give interviewers nothing to work with — and nothing to redirect. Even saying "I'm not sure where to go from here, but I know that..." keeps the conversation alive and shows intellectual honesty.
The second most common mistake is over-rehearsing answers to specific questions rather than developing genuine problem-solving fluency. Cambridge interviewers are experienced at spotting prepared answers, and they will probe beneath them. A candidate who has memorised a response to "what is recursion?" but cannot apply the concept to a novel problem has not prepared in the right way.
Candidates also frequently underestimate the mathematical rigour expected. This is not a general interest interview. Vague answers that gesture at the right idea without precision will not impress. Cambridge interviewers want to see you handle abstraction cleanly and reason to conclusions rather than approximate them.
Finally, many candidates fail to engage with feedback during the interview itself. If an interviewer says "are you sure about that?" or offers a hint, they are not being hostile — they are giving you an opportunity. Treat every prompt as useful information and adjust your thinking accordingly.
For full entry requirements and course information, see the Cambridge Computer Science course page.
Practice with real interview questions
Free samples in nine subjects show you the format. The full expert packs — 30 packs across 17 subjects — are £180 each and carry worked model answers and technique notes, including the Computer Science pack.
Silence is the mistake that costs the most, and the hardest to self-correct
A candidate who goes quiet at the difficult moment has given the interviewer nothing to work with and no opening to offer a hint. Nobody notices themselves doing it; it only shows up when someone else is in the room.
The Computer Science pack, £180, gives you problems to practise narrating out loud — algebra, formal proof and Big-O reasoning among them — each with a model of how the answer should sound spoken aloud rather than written out neatly at the end.
Most Cambridge Computer Science applicants have two interviews, both typically held at their college in December. In some cases, a second college may also request an interview — this is not a negative sign and simply reflects the pooling process Cambridge uses to ensure strong candidates are not lost due to college-level competition. Each interview is usually conducted by two academics and lasts between 25 and 40 minutes.
Cambridge is looking for evidence that you engage with Computer Science and mathematics as intellectual disciplines, not just exam subjects. Reading books that sit at the intersection of mathematics, logic, and computation — such as Gödel, Escher, Bach or Sipser's Introduction to the Theory of Computation — demonstrates this well. Building projects that required genuine problem-solving, or working through online courses in algorithms or discrete mathematics, also gives you material to discuss with depth and honesty. The key is that your engagement should be real, not performative.
Yes — and they are worth doing more than once. The specific skill of reasoning out loud under pressure, responding to interruptions, and adjusting your thinking in real time cannot be developed by working through problems alone. A mock interview with someone who can push back, ask follow-up questions, and give honest feedback on your reasoning process is qualitatively different from solo practice. Candidates who have done several mock interviews consistently report that the real interview feels more manageable as a result.
Cambridge Computer Science interviews are among the most mathematically rigorous in the UK. Unlike many university interviews, which focus on motivation and personal statement discussion, Cambridge interviews are almost entirely problem-based. The level of mathematical abstraction expected is higher than at most other institutions, and the pace can be demanding. Oxford Computer Science interviews share some of these characteristics, but the college structure and interviewer style differ. Other leading universities — Imperial, UCL, Edinburgh — do not typically conduct interviews for Computer Science at all, which means the Cambridge process requires a specific and deliberate kind of preparation.
Free samples in nine subjects show you the format; the full expert packs are £180 each, thirty packs across seventeen subjects.
Rated Excellent on Trustpilot. That is the company’s rating, not a rating of this pack.
Ten questions across 14 pages — the shortest pack in the catalogue — each set out in the same three layers as the worked example above: the question, the hints to reach for if you stall, then a full worked answer. One PDF, one payment, instant download.
Not on its own. A PDF cannot hand you a new constraint mid-answer and see whether you notice the assumption you are still relying on. What it can do is make the shape of a strong answer familiar — state it, cost it, then improve it — before someone does that to you for real.
Nine of the thirty packs carry a free sample PDF and Computer Science is not one of them. The worked question above follows the same three-layer format used inside the pack — question, hints, then a full worked answer — so it shows how the pack reads even though it is not one of its own ten questions.
Ten questions across fourteen pages — the shortest pack in the catalogue — each taken through to a full worked answer. One-off purchase, instant download.
Get the Computer Science Pack — £180Computer Science is not one of the nine subjects with a free sample; the pack itself, and the worked binary-tree question above, are the preview. Considering Oxford instead? The Oxford Computer Science interview page covers that pack separately.