Computer Science Interview-style Questions
Note: Oxford and Cambridge do not publicly release any interview questions because they often reuse questions across application cycles. Below are interview-style questions of suitable difficulty that will help you prepare for your Oxbridge interview.
Question 1
If it were discovered that P equals NP, what would be the implications for computer science and cryptography?
Question 2
You are locked in a room with your worst enemy. On a table is a bar of chocolate, divided into squares in the usual way. One square is painted with bright green paint containing a deadly poison. You and your enemy take turns to break off one or more squares from the remaining chocolate (along a straight line) and eat them. Whoever is left with the green square must eat it and die. You may look at the bar of chocolate and decide whether to go first or second.
Describe your strategy.
Question 3
The game of Scribble uses tiles bearing the letters P, Q, or R. The game begins with PQ on the board. Each move applies one of these rules:
• If the word is Px (for some word x), you may change it to Pxx
• If the word is xQQQy (for some words x and y), you may change it to xRy
• If the word is xRRy, you may change it to xy
(i) For each of QPR, PQQ, PQR, PR, say whether you can make it or not.
(ii) Given any word, how can you decide whether it can be made or not?
Question 4
A group of 7 pirates has 100 gold coins. They must decide how to divide the treasure, but must abide by pirate rules:
• The most senior pirate proposes a division
• All pirates vote (including the proposer)
• If 50% or more accept, the proposal passes
• Otherwise, the proposer is thrown overboard and the process repeats
• Pirates are perfectly rational and want to: (1) stay alive, (2) get maximum gold, (3) throw others overboard if possible
What division should the senior pirate propose?
Question 5
An urn contains 23 white beans and 34 black beans. A monkey takes out two beans; if they are the same, he puts a black bean into the urn, and if they are different, he puts in a white bean from a large heap next to him. The monkey repeats this procedure until there is only one bean left.
What colour is it?
Interview Tips
Think out loud: The interviewer will be assessing your ability to think through complex problems. They can only do this if they know your thought process.
Be familiar with your syllabus: The interviewer can ask you a question from any topic you have been taught already in your A level/IB syllabus.
Practice: There is no better way to prepare than to practice.
For comprehensive guidance, visit our Oxbridge Interview Guide.