Cambridge Computer Science Interview Questions 2026 with Model Answers
Practical guidance from the Leading Tuition team
Get the Computer Science pack — £180Practical guidance from the Leading Tuition team
Get the Computer Science pack — £180Cambridge Computer Science interviews are among the most mathematically rigorous at any UK university, combining algorithm design, discrete mathematics, and formal logic under genuine time pressure. Interviewers expect structured reasoning, not just correct answers. Updated April 2026 for 2026/27 entry. The same questions, answered in full, are in the Computer Science pack at £180.
Cambridge CS interviews are conducted by college Fellows, typically in two separate sessions on the same day or across two days. Each interview lasts around 25–40 minutes. The panel is not looking for a polished performance — they are assessing how you think when you encounter a problem you have never seen before.
Two Fellows, two sessions, and a proof you have never seen before
The expert interview packs — 30 packs across 17 subjects, £180 each — carry worked model answers plus technique notes from specialist subject tutors, and the Computer Science pack works through algorithm design, Big O complexity, combinatorics and curve sketching. There is no free Computer Science sample, though nine subjects including maths and physics have one.
Computer Science expert pack £180The core areas tested in 2026 include:
Candidates are expected to have strong A-level Mathematics. Further Mathematics is not formally required, but the depth of mathematical reasoning expected — particularly around sequences, series, and proof — means that students without it will need to do significant independent preparation. The Cambridge CS admissions test, the TMUA (Test of Mathematics for University Admission), is sat in October and tests similar mathematical territory. Strong TMUA performance signals readiness for the interview's mathematical demands.
Can you build a solution out loud while someone keeps changing the problem?
That is the skill the three worked problems below are testing. A Fellow rarely lets a first answer stand — they interrupt partway through, add a constraint, or ask what the same method costs at the opposite end of the input, and the candidate has to keep reasoning rather than restart. The three problems that follow are built the same way: state an approach, then name what it costs, because a Cambridge interviewer marks the trade-off you can name almost as closely as the algorithm you land on.
The Computer Science pack carries ten further problems built the same way — a plain question, a Hints layer for when you stall, and a full worked answer that shows where a first attempt gives way to a better one, at £180 total.
Question: You are given an array of n integers where each value lies between 1 and n. Describe an algorithm to find whether any value appears more than once. What is the time and space complexity of your approach?
Model answer: A naïve approach compares every pair of elements — O(n²) time, O(1) space. A better approach sorts the array first (O(n log n) time) and then scans for adjacent duplicates. The optimal approach uses a hash set: iterate through the array, and for each element check whether it already exists in the set. If it does, a duplicate has been found. If not, add it. This runs in O(n) time and O(n) space.
Reasoning note: Interviewers want to see you generate multiple solutions and compare them explicitly. Jumping straight to the optimal answer without acknowledging trade-offs is a missed opportunity. Always state your assumptions — for example, whether the array is sorted or whether memory is constrained.
Question: How many distinct paths are there from the top-left corner to the bottom-right corner of a 4×4 grid, moving only right or down?
Model answer: To reach the bottom-right corner of a 4×4 grid (i.e., moving from position (1,1) to (4,4)), you must make exactly 3 moves right and 3 moves down — 6 moves in total. The number of distinct orderings of these moves is the number of ways to choose which 3 of the 6 moves are rightward: C(6,3) = 20.
Reasoning note: This is a combinatorics problem dressed as a grid problem. Recognising the underlying structure — that the problem reduces to choosing positions in a sequence — is exactly what Cambridge interviewers reward. A dynamic programming solution (building up a table of path counts) is also valid and demonstrates algorithmic thinking.
Question: Define a recursive function that computes the sum of digits of a positive integer. What happens if the integer is 0?
Model answer: Define f(n) as follows: if n = 0, return 0 (base case). Otherwise, return (n mod 10) + f(n div 10). For n = 253: f(253) = 3 + f(25) = 3 + 5 + f(2) = 3 + 5 + 2 + f(0) = 10. The base case f(0) = 0 is essential to terminate the recursion. For n = 0 as an input, the function correctly returns 0, since 0 has a digit sum of 0.
Reasoning note: Always define your base case explicitly and justify it. Interviewers will probe edge cases — what about negative integers? What about single-digit numbers? Anticipating these shows mathematical maturity.
Question: Prove that the sum of the first n positive integers equals n(n+1)/2.
Model answer:
Base case: For n = 1, the sum is 1. And 1(1+1)/2 = 1. ✓
Inductive hypothesis: Assume the statement holds for some k ≥ 1, i.e., 1 + 2 + … + k = k(k+1)/2.
Inductive step: We must show it holds for k+1. The sum 1 + 2 + … + k + (k+1) equals k(k+1)/2 + (k+1) by the inductive hypothesis. Factoring: (k+1)[k/2 + 1] = (k+1)(k+2)/2. This is exactly the formula for n = k+1. ✓
Conclusion: By the principle of mathematical induction, the formula holds for all positive integers n.
Reasoning note: Cambridge interviewers expect you to state all three components — base case, hypothesis, and step — clearly and separately. Skipping the base case or being vague about what you are assuming are common errors that cost marks.
Question: Is the following statement true or false? "If a number is divisible by 4, then it is divisible by 2." Can you write the contrapositive?
Model answer: The statement is true — any multiple of 4 is also a multiple of 2. The contrapositive is: "If a number is not divisible by 2, then it is not divisible by 4." This is logically equivalent to the original and is also true. The converse — "if divisible by 2, then divisible by 4" — is false (e.g., 6 is divisible by 2 but not 4).
Reasoning note: Interviewers are checking whether you distinguish the contrapositive — which is always logically equivalent to the original statement — from the converse, which is not, rather than treating any rearrangement of a conditional as interchangeable. Producing a concrete counterexample to disprove the converse, rather than just asserting it is false, is what separates a rigorous answer from a lucky guess.
Both universities conduct rigorous CS interviews, but the emphasis differs in important ways. The table below summarises the key distinctions for 2026 entry.
| Cambridge CS | Oxford CS | |
|---|---|---|
| Primary focus | Formal mathematics, proof, discrete maths | Algorithmic intuition, problem decomposition |
| Mathematical rigour | Very high — proofs expected | High — but less formal proof emphasis |
| Admissions test | TMUA (October) | TMUA (October) |
| Coding knowledge | Not directly tested, but pseudocode used | Not directly tested |
| Expected background | A-level Maths essential; Further Maths strongly advantageous | A-level Maths essential; Further Maths helpful |
| Interview structure | Typically 2 interviews per college | Typically 2 interviews, sometimes 3 |
| Problem style | Abstract, mathematical, proof-based | More applied, step-by-step construction |
Oxford tends to build problems incrementally — you might start with a simple case and be guided toward a generalisation. Cambridge is more likely to present a formal mathematical statement and ask you to prove or disprove it from the outset. Neither style is harder in absolute terms, but they reward different preparation.
Preparation for Cambridge CS interviews should begin well before the TMUA in October. The following approach is structured around the areas most likely to appear.
For structured practice with realistic problems, Cambridge Computer Science interview questions with worked solutions cover the full range of topics — from formal proof to algorithm design — with annotated model answers that show the reasoning process, not just the final result.
One of the most effective preparation habits is to practise explaining your thinking to someone who will push back. Cambridge interviewers are not passive — they will redirect you, introduce constraints, and ask you to generalise. Practising under that kind of pressure is essential.
Working through that plan with someone who pushes back
Reading the list is not the same as being interrupted mid-proof and asked to generalise on the spot, which is what the interview actually does. Each habit above turns into a live demand once a Fellow is sitting across the table: showing that a quadratic sits inside O(n²) is one thing, redoing it after a Fellow zeroes one of your constants is another. The Computer Science pack takes Big O growth rates, a password-counting problem and two open questions on what makes an algorithm iterative through to a full worked answer each, £180 for the set, so the syllabus above has something concrete to test itself against before December.
Cambridge's own Computer Science department points applicants at Oxford's sample problems rather than publishing its own. We traced what Cambridge actually publishes.
Further Mathematics is not a formal requirement for Cambridge Computer Science, but the interview's mathematical depth — particularly around proof, combinatorics, and discrete mathematics — means applicants without it face a steeper preparation curve. Many successful applicants do hold Further Maths, and those who do not should work through equivalent material independently before interview.
Interviewers do not test specific programming languages or expect you to write syntactically correct code. However, you may be asked to describe algorithms in pseudocode or trace through a recursive process step by step. The focus is on computational thinking and mathematical reasoning, not programming syntax.
Most Cambridge CS applicants have two interviews, both conducted at their applied college. In some cases, applicants may be seen by a second college (an open pool interview), particularly if their applied college is considering them but wants a second opinion. Each interview typically lasts 25–40 minutes.
Yes — the TMUA (Test of Mathematics for University Admission), sat in October, is used alongside predicted grades to decide which applicants are called for interview. A strong TMUA score improves your chances of receiving an interview invitation. The mathematical content of the TMUA — sequences, proof, combinatorics, and logic — overlaps closely with what is tested at interview, making TMUA preparation directly useful for interview readiness.
Cambridge Computer Science interviews are genuinely demanding, but they are also fair — every candidate is given problems they are unlikely to have seen before, and the process rewards clear thinking over memorised answers. With thorough preparation in discrete mathematics, proof technique, and algorithm design, candidates can approach the interview with real confidence. None of it depends on having met the specific problem before; it depends on treating an unfamiliar proof the way the interview does — built in front of another person, one step and one check at a time, rather than recalled.
Cambridge Computer Science interview questions with algorithm and discrete mathematics solutions
Cambridge Computer Science interview preparation with Leading Tuition
Most Oxbridge interviews last between 20 and 45 minutes and are conducted by one or two subject tutors at the college you have applied to. The format focuses on academic discussion rather than personal statements — tutors typically give you an unseen problem, passage, or object and ask you to think through it aloud. They are assessing how you reason under pressure and engage with new ideas, not whether you arrive at a 'correct' answer. Preparation should therefore focus on practising structured reasoning and academic argument.
The Computer Science pack is ten questions across 14 pages, shorter than any other pack in the catalogue, moving from a plain question to Hints to a full worked answer. What it cannot do is put a Fellow across the table who changes the question the moment your first idea starts to work — the worked answers on this page show the finished reasoning, not the two minutes of dead air before a candidate says something that turns out to be wrong. The three worked problems above are the closest preview there is.
Official Resources
Ten questions, 14 pages, worked in full for £180 — the whole of the Computer Science pack, nothing held back.
Get the Computer Science pack — £180Rated Excellent on Trustpilot. That is the company’s rating, not a rating of this pack.