Optiver Interview Questions
33 real interview questions for Software Engineer roles at Optiver.
Showing 1–30 of 33 questions
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.
Given a list of exchange rates between different currency pairs and an amount in one currency, convert the amount to another specified currency.
Create functions that simulate communication with exchanges and ensure that short-selling is avoided.
Given a graph and two vertices, implement Dijkstra's algorithm to find the shortest distance between the pair. Additionally, return an error if there are multiple shortest paths with the same distance between the vertices.
Given a mapping of 7 letters to their respective Morse code representations and a string of dots and dashes (with no spaces), find all valid interpretations of the Morse code string as sequences of those letters.
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 bits are required to represent a positive integer with exactly 16 digits and no leading zeros, in binary representation?
Want the full solutions?
Get detailed walkthroughs for all 120+ Optiver questions with Quant Blueprint.
Get Started