Optiver

Interview Question

Software Engineer Interview
Optiver

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

Unlock the Full Solution

Enter your email to get instant access to the complete solution, explanation, and similar practice problems.

Insights on 100+ quant firms, understand where to apply, and maximize your chances.

Get the official 2025 QB Quant Firm Tier List

Check your email inbox — you should get the interview in 1-2 minutes!