Optiver Interview Questions
120 real interview questions at Optiver.
Showing 31–60 of 120 questions
What is the next term in the sequence: 1/1, 1/2, 1/3, 1/5, 1/8?
How many prime numbers are there from 1 to 10,000?
What is the result of dividing 335 by 7?
Approximate the probability of getting exactly 50 heads in 100 tosses of a fair coin, not as a combinatorial expression, but as a percentage or a simplified fraction.
What is the result of dividing 3/4 by 1/2? Show your calculations.
What is the expected value of the sum of the values of three randomly selected cards from a standard deck of 52 playing cards?
How much memory is required to store a linked list with 1,000 elements?
Design and implement a queue data structure.
Design a class diagram for a mock trading system.
Given an array of stock prices for n days, return the maximum profit achievable using at most k transactions. Complete the function int stock(int* prices, int k, int n).
Complete a function that takes in a seqId (int) and a character (from 'a' to 'z' or '-'), where seqIds may arrive out of order. When the collected characters, sorted by seqId, form a complete message in the format '-FullMessage-', the function should print the message immediately using the provided OnComplete(msg) function.
Implement a queue class without being able to resize memory.
Create a function in C++ to calculate the difference in days between two dates. Explain why your solution works.
Given a sentence s and a list of word pairs, where each pair consists of strings a and b indicating that word a can be converted to word b (but not necessarily vice versa), determine the minimum length sentence you can translate the original sentence to. If there is more than one shortest sentence, return the lexicographically smallest one.
Write an algorithm that replaces words in a paragraph with their corresponding synonyms from a thesaurus.
Given the edges of a tree, output the pre-order traversal of the tree.
Given two sorted arrays, find the median of the combined arrays. Explain your algorithm and discuss how you would handle edge cases.
Given two dates, calculate the number of days between them.
Implement an algorithm to merge N sorted lists.
Why are the wait and notify methods declared in the Object class instead of the Thread class in Java?
Given an array of integers, find the third largest number in the array.
Given two dates (for example, 12/21/2001 and 4/13/2007), calculate the number of days between them.
Given a list of tuples (AB, BC, AD, BE, CF), construct a binary tree and determine if it is a valid binary tree. You must check for the following five types of errors: (1) input is in the correct format; (2) no duplicate nodes; (3) the root has only two children; (4) every node is present in the tree; and (5) there are no cycles in the binary tree.
Given an encoded tree represented as a list of pairs of nodes, verify that the input is a valid tree and check whether there are any cycles in the structure.
Describe how you would store and sort the prices of items coming from multiple exchanges. Write code to demonstrate your approach.
Given a list containing all numbers from 1 to n except one missing number, find the missing number.
How would you calculate the final price of an asset in a trading simulation given historical trading data?
Given four numbers, use arithmetic operations (+, -, ×, ÷) to make 24. Each number must be used exactly once.
What is the next number in the sequence: 1, 16, 7, 100, 13?
What is the expected value of a dice rolling game where you roll two standard six-sided dice, receive the sum of the two dice unless both show the same number, in which case you receive 0?
Want the full solutions?
Get detailed walkthroughs for all 120+ Optiver questions with Quant Blueprint.
Get Started