CONTENTS

    My 2026 Optiver HackerRank Questions & Firsthand Experience

    avatar
    Seraphina
    ·2025年10月15日
    ·6分钟阅读
    I am sharing my real experience with Optiver Hackerrank questions in 2025 and the secrets that helped me succeed

    Optiver HackerRank Questions

    The Optiver online assessment consists of four parts: NumberLogic, Beat The Odds, Zap-N, and a coding section. Below, I’ll dive into the coding section, which was completed on HackerRank and consisted of three questions with a total time limit of 90 minutes.

    I’m really grateful to Linkjob.ai for helping me pass my interview, which is why I’m sharing my OA questions and experience here. Having an AI tool helping me during the interview indeed provides a significant edge.

    Question 1

    Goal: Calculate the number of distinct sequences to reach the target number of shares n from the initial number of shares k through at most m buy or sell transactions (1 share each time).

    Core conditions:

    • The total number of buy transactions is (n - k) more than the total number of sell transactions (net purchase quantity)

    • The total number of operations (buys + sells) does not exceed m

    • The number of shares held cannot be negative at any time

    Solve using dynamic programming:

    • Define dp[i][j] as the number of sequences with i operations and j shares held

    • Initial state: dp[0][k] = 1 (only the initial state when there are no operations)

    • State transition:

      • For each operation, you can buy: dp[i + 1][j + 1] += dp[i][j]

      • Or sell (if j > 0): dp[i + 1][j - 1] += dp[i][j]

    • Result: Sum of dp[i][n] for all i (0 ≤ i ≤ m)

    Question 2

    Goal: Allocate funds according to fixed weights, rebalance daily, and calculate the mean and standard deviation of daily log returns.

    Operation steps:

    • Initially buy stocks according to weights (capital × weight ÷ stock price = number of shares held)

    • Calculate the current total assets daily (sum of the number of shares held for each stock × the stock price of the day)

    • Rebalance: Adjust the number of shares held according to the stock prices and weights of the day (to ensure the proportion of each stock remains unchanged)

    • Calculate daily return: ln(current day's assets ÷ previous day's assets)

    Statistical calculation:

    • The average of all daily returns

    • The standard deviation of all daily returns

    AI Interview Assistant for Online Assessment

    Linkjob AI worked great and I got through my interview without a hitch. It’s also undetectable, I used it and didn't trigger any HackerRank detection.

    Question 3

    Goal: Simulate order book trading and calculate the total sum of all transaction prices.

    Order book maintenance:

    • Buy order list: Sorted in descending order of price (to easily find the highest feasible price)

    • Sell order list: Sorted in ascending order of price (to easily find the lowest feasible price)

    Order processing logic:

    • When processing a buy order: Find the lowest sell order with a price ≤ the buy order price. After the transaction, remove the sell order and accumulate the transaction price

    • When processing a sell order: Find the highest buy order with a price ≥ the sell order price. After the transaction, remove the buy order and accumulate the transaction price

    • Orders that cannot be transacted are added to the corresponding list for waiting

    Result: The total sum of all transaction prices

    Optiver Online Assessment Non Coding Sections

    Optiver's online assessment has three other parts besides the coding section, but these other parts are mainly in the form of games and arithmetic problems.

    NumberLogic

    This section typically lasts 25 minutes and focuses on your ability to recognize patterns within numerical data.

    • Format: You are presented with a series of numbers and must predict the next number in the sequence.

    • The Challenge: As you progress, the sequences involve fractions, large numbers, and complex alternating rules.

    • Survival Tip: Since incorrect answers often result in a penalty, precision is key. If you encounter a sequence that seems impossible to crack, it is often better to skip it than to guess blindly.

    Beat The Odds

    This is one of Optiver’s most distinctive assessments, lasting a total of 30 minutes with a strict 90-second limit per question.

    • Core Logic: You are required to "bet" on specific events, such as sports outcomes or card game scenarios.

    • The Goal: You must calculate the Expected Value (EV) and decide how to allocate your capital based on the odds provided.

    • Strategic Approach: Focus your preparation on conditional probability and Bayes' Theorem. Under such tight time constraints, you don't always need an exact decimal answer; you need the intuition to quickly decide if a "trade" is profitable.

    Zap-N

    Zap-N is a collection of mini-games totaling 60 minutes that measure attention span and task-switching capabilities.

    • Balloon Game (Risk Preference): You pump up a balloon to earn money, but if it pops, you lose everything. This tests your ability to learn from mistakes and manage greed.

    • Pincode (Memory Challenge): You must memorize and re-enter numerical sequences. In later stages, you may be asked to enter them in reverse order or ascending order, which heavily taxes your working memory.

    • Code-Compare (Attention to Detail): You are asked to identify minute differences between two similar strings of text or code in a very short window, testing your visual accuracy under pressure.

    Optiver Hackerrank Questions Overview

    From my experience with Optiver's Hackerrank assessment, the questions primarily focus on two key areas: Coding and Problem-Solving, and Quantitative and Probability. These align closely with the skills needed for roles that blend technical execution with financial reasoning, as reflected in the three questions we’ve discussed.

    Coding and Problem-Solving

    This section tests my ability to translate real-world trading scenarios into structured code, emphasizing logic, efficiency, and adherence to constraints.

    Dynamic Programming for Sequential Decisions: The first question required me to model state transitions with dynamic programming. This tested my ability to break complex sequential problems into manageable subproblems.

    Order Book Simulation with Structured Data: The third question, simulating order book transactions, focused on efficient data structure usage. Processing each order involved checking for feasible matches, updating totals, and managing unexecuted orders; these skills are critical for real-time trading systems.

    Iterative Process Modeling: Both the portfolio rebalancing question (second question) and the sequence-counting problem required step-by-step simulation. For rebalancing, this meant daily recalculations of asset values, adjusting holdings to maintain weights, and tracking returns.

    Quantitative and Probability

    These questions assess my ability to apply mathematical reasoning to financial contexts, directly tied to trading and portfolio management.

    Return Calculations and Rebalancing Logic: The second question centered on computing daily log returns for a portfolio with fixed weights. I applied logarithmic transformations to daily asset values to calculate returns, while ensuring rebalancing preserved weight proportions.

    Statistical Aggregation: After computing daily returns, I derived mean and standard deviation, key metrics for assessing risk and return profiles in trading.

    Constraint-Based Counting: The first question also involved probabilistic thinking, as it required counting valid transaction sequences under constraints. This mirrors real-world scenarios where traders evaluate possible paths to achieve position goals.

    Preparation for Optiver HackerRank Questions

    Programming Skills

    I started prepping by brushing up on programming basics, focusing on Python. It’s fast and easy to code with during timed tests. I practiced writing clean code quickly, and also worked on reading code. Using online platforms, I tackled various question types, making sure data structures like arrays, lists, and dictionaries felt intuitive.

    Math and Logic Practice

    A solid math foundation was just as critical. So I dedicated time to brushing up on math topics key for quantitative finance roles, including:

    • Stochastic calculus

    • Partial differential equations (PDEs)

    • Advanced numerical methods

    I also practiced high-speed arithmetic, probability puzzles, and expected-value problems. To align with the test’s style, I hunted for Optiver-specific practice tests and materials online.

    FAQ

    What are the other parts of Optiver’s online assessment like?

    NumberLogic gives you 25 minutes to solve one question.

    Beat The Odds lasts 30 minutes in total, but you only have 90 seconds for each question.

    Zap-N is presented in the form of a mini game, with a total duration of 60 minutes.

    Can I take breaks between the four OA sections? Do I have to finish them all in one go?

    You can take breaks in between, as long as you complete everything within the given time frame. The OA must be finished within seven days.

    If I don’t pass the interview, can I reapply later?

    Yes, you can, but Optiver only allows one application within a 12-month period.

    See Also

    How to Cheat HackerRank Tests With AI: My 2026 Update

    How I Passed 2026 Microsoft HackerRank Test on My First Try

    How I Passed 2026 JP Morgan HackerRank Assessment: Q&A

    2026 Update: My Stripe HackerRank Online Assessment Questions

    Questions I Encountered in 2026 Goldman Sachs HackerRank Test