Optiver Interview Questions
120 real interview questions at Optiver.
Showing 91–120 of 120 questions
Given two very large integers represented as strings, implement multiplication of these numbers. You cannot use built-in big integer libraries. You must represent the digits as strings, implement addition of two strings, and then use that method as part of your multiplication function. How would you handle carries correctly in your implementation?
Given an exchange feed that provides up to five rows of depth information per second (five price points and their respective quantities, for both buy and sell sides of a specific stock), design and implement a more efficient solution on the server so that clients are only sent updates for price points whose quantity has changed, rather than sending all the data every time.
How many bits are required to represent a positive integer consisting of 16 digits, with no leading zeros, in binary representation?
What is the use of atomic operations in multiprocessing?
Given an array of integers, find the maximum possible sum of any non-empty contiguous subarray.
How many digits are there in 100! (100 factorial)?
How many bits are required to represent a positive integer with exactly 16 digits and no leading zeros, in binary representation?
Make a market on the percentage of the Earth's Equator that passes through land.
Given randomly generated sequences of digits of increasing lengths, displayed one digit at a time, memorize each sequence and then recall and re-enter the sequence in sorted order.
Given an array of stock prices over n days, return the maximum profit that can be achieved with at most k transactions. Implement the function int stock(int* prices, int k, int n).
Complete a function that takes in a seqId (int) and a char (consisting of 'a'-'z' and '-'). The seqId values may be received out of order. A full message is formed when the characters, sorted by seqId, create a string in the format "-FullMessage-". The goal is to print out any full message exactly when it completes, using the provided OnComplete(msg) function.
Implement a queue data structure class without being able to resize the underlying memory allocation.
What is the expected number of moves required to exit the center of a 10x10 grid, assuming you can move one step in a random direction (up, down, left, right) at each move?
What is the probability that, given a random number from 1 through 1,000,000, the digit 7 appears at least once in the selected number?
You throw two dice and then may choose to reroll just one of them, and only once. What is the expected value?
Identify any arbitrage opportunities, if any, in the given matrix of currency conversion rates.
Can you derive the formula for ordinary linear regression?
Someone has $100 to gamble. First, he will bet $1, and if he wins, he will leave. Otherwise, he will double his bet on each subsequent round until he wins. What is his profit from this game?
Roll a die repeatedly until you obtain either a 5 or a 6. If you roll a 5, you cash out the sum of all previous rolls, excluding the 5. If you roll a 6, you receive no payout. You are allowed to cash out mid-game for the sum accrued up to that point. How can you maximize your expected payoff?
Given a simulated order book, how would you determine the fair value of a derivative?
What is the total number of ways to arrange 3 red balls, 7 blue balls, and 9 green balls in a line?
In a family, the parents continue having children until they have more girls than boys. What is the expected number of children in this family?
If you flip 100 fair coins, what is the variance of the number of Heads?
Divide 2 by 17 to four decimal places without using any calculator or external materials.
An interviewer will play Padel against me. The interviewer, being better, has a 70% chance to win a point against me. The game is played to 11 points, but a player must win by at least 2 points. The current score is 9 to 9. What is the probability that I win the game?
Estimate how many ways there are to add three positive integers to obtain a sum of 25.
You have 16 watermelons and a seesaw. What is the minimum number of tests required to determine the two heaviest watermelons?
Six people are sitting around a circle. What is the probability that they are seated in increasing order of age, either clockwise or counterclockwise?
A group of people wants to determine their average salary on the condition that no individual can find out anyone else's salary. Can they accomplish this, and if so, how?
Two people each flip a fair coin 4 times. What is the probability that both people end up with the same number of heads?
Want the full solutions?
Get detailed walkthroughs for all 120+ Optiver questions with Quant Blueprint.
Get Started