Optiver Software Engineer Coding & Algorithms Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Design a queue and analyze tradeoffs
Design a FIFO queue data structure that supports enqueue, dequeue, peek, and isEmpty. Compare implementations using a singly linked list, a dynamic ar...
Design a satellite propagation simulator
Implement a SatelliteNetwork class to simulate message propagation over an undirected satellite graph. Provide these methods: ( 1) satellite_connected...
Design a balloon stability tracker
Implement a class BalloonFestival to manage hot-air balloons and wind fields over time, and to report rewarded balloons at inspection times. Methods a...
Implement price-based order matcher
Design and implement a price-based order matcher for unit-sized orders. You are given an array orders where each element is [type, price]: type = 1 de...
Decide and implement DP/heap and approximation
You have 90 minutes to complete three related coding tasks: a) Dynamic programming: Given an integer array nums (n ≤ 2e 5) and a threshold T, design a...
Design a Balloon Festival Simulator
Implement a class BalloonFestival with the following API and rules. Goal Track hot air balloons (yours and competitors), evolving wind fields, and bal...
Identify OS component causing process starvation
A system with 2 CPU cores runs 5 identical processes continuously. Four processes get equal CPU time, but the fifth appears to get none. Which part of...
Simulate satellite message propagation with timing
Design and implement the SatelliteNetwork to process a stream of N instructions: - SatelliteConnected(SatelliteId): add a satellite; invoke ErrDuplica...
Compare common data structures and uses
Compare common data structures and select appropriate ones for specific tasks. For arrays, linked lists, stacks, queues, hash tables, binary search tr...
Solve three mini-game algorithm tasks
Solve three mini-game algorithm tasks: (a) Move-House Puzzle: Given initial and target arrangements of N labeled blocks ("houses") on a 2D grid with o...
Explain OS processes, threads, and memory
Explain core operating system concepts: processes vs threads, context switching, and scheduling (preemptive vs cooperative and common algorithms). Des...
Estimate expected comparisons in a BST
In a particular binary search tree, finding node A takes 1 comparison and finding node D takes 3 comparisons. What is the expected number of compariso...
Detect currency arbitrage with costs
You are given a K×K matrix R of currency exchange rates where R[i][j] is the amount of currency j obtainable for one unit of currency i, and R[i][i] =...
Count nonnegative buy/sell sequences
You must perform exactly 2n unit trades starting with 0 shares and ending with 0 shares. Each trade is either a buy (+1 share) or a sell (−1 share), a...