All Companies

Optiver Interview Questions

33 real interview questions for Software Engineer roles at Optiver.

Showing 1–30 of 33 questions

1

How much memory is required to store a linked list with 1,000 elements?

Software EngineerSoftware Engineer
2

Design and implement a queue data structure.

Software EngineerSoftware Engineer
3

Design a class diagram for a mock trading system.

Software EngineerSoftware Engineer
4

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).

Software EngineerSoftware Engineer
5

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.

Software EngineerSoftware Engineer
6

Implement a queue class without being able to resize memory.

Software EngineerSoftware Engineer
7

Create a function in C++ to calculate the difference in days between two dates. Explain why your solution works.

Software EngineerSoftware Engineer
8

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.

Software EngineerSoftware Developer
9

Write an algorithm that replaces words in a paragraph with their corresponding synonyms from a thesaurus.

Software EngineerSoftware Engineer
10

Given the edges of a tree, output the pre-order traversal of the tree.

Software EngineerSoftware Engineer
11

Given two sorted arrays, find the median of the combined arrays. Explain your algorithm and discuss how you would handle edge cases.

Software EngineerSoftware Engineer
12

Given two dates, calculate the number of days between them.

Software EngineerSoftware Engineer
13

Implement an algorithm to merge N sorted lists.

Software EngineerSoftware Engineer
14

Why are the wait and notify methods declared in the Object class instead of the Thread class in Java?

Software EngineerDeveloper
15

Given an array of integers, find the third largest number in the array.

Software EngineerSoftware Engineer
16

Given two dates (for example, 12/21/2001 and 4/13/2007), calculate the number of days between them.

Software EngineerSoftware Engineer
17

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.

Software EngineerSoftware Engineer
18

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.

Software EngineerSoftware Engineer
19

Describe how you would store and sort the prices of items coming from multiple exchanges. Write code to demonstrate your approach.

Software EngineerSoftware Engineer
20

Given a list containing all numbers from 1 to n except one missing number, find the missing number.

Software EngineerSoftware Developer
21

Given a list of exchange rates between different currency pairs and an amount in one currency, convert the amount to another specified currency.

Software EngineerSenior Software Engineer
22

Create functions that simulate communication with exchanges and ensure that short-selling is avoided.

Software EngineerSenior Software Engineer
23

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.

Software EngineerSenior Software Engineer
24

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.

Software EngineerSenior Software Developer
25

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?

Software EngineerSenior Software Developer
26

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.

Software EngineerSenior Software Developer
27

How many bits are required to represent a positive integer consisting of 16 digits, with no leading zeros, in binary representation?

Software EngineerGraduate Software Developer
28

What is the use of atomic operations in multiprocessing?

Software EngineerGraduate Software Developer
29

Given an array of integers, find the maximum possible sum of any non-empty contiguous subarray.

Software EngineerGraduate Software Engineer
30

How many bits are required to represent a positive integer with exactly 16 digits and no leading zeros, in binary representation?

Software EngineerGraduate Software Developer

Want the full solutions?

Get detailed walkthroughs for all 120+ Optiver questions with Quant Blueprint.

Get Started