robinhood logo

Robinhood Interviews

4 experiences78 reads4 questions0% success rate
Robinhood System Design Round (Virtual Onsite)
robinhood logo
Robinhood
October 21, 202514 reads

Summary

During my virtual onsite system design interview at Robinhood, I was presented with a challenge to design a fault-tolerant order entry system specifically for limit orders.

Full Experience

I participated in a virtual onsite system design round at Robinhood. The interviewer presented me with a complex system design problem, asking me to architect an order entry system. This problem focused heavily on the intricacies of handling limit orders, ensuring concurrent request tolerance, and designing for server instance failures without data corruption. It was a comprehensive design challenge.

Interview Questions (1)

Q1
Design a Fault-Tolerant Limit Order Entry System
System DesignHard

At Robinhood, we have an order entry system that accepts both buy and sell orders from our clients. These orders must be validated first before they are forwarded to a third party exchange.

For this question, we will only focus on limit order instead of market orders. Because limit orders do not receive immediate executions from the stock market, there can be an arbitrary wait. This means the orders can stay open forever.

Our system must tolerate concurrent requests and server instance failures without data corruption or 'double spending' issues.

Robinhood Coding Interview Question
robinhood logo
Robinhood
October 21, 202537 reads

Summary

During my Robinhood coding interview, I was presented with a complex problem focused on managing fractional share inventory and processing buy/sell orders efficiently.

Full Experience

My coding interview at Robinhood involved a detailed problem concerning the management of fractional shares. The challenge was to accurately track inventory, handle both purchasing and selling of fractional shares, and ensure the inventory for any given symbol always remained non-negative and below one whole share through a 'flattening' process. The problem provided specific examples and input/output formats, including a follow-up to build an inventory log detailing transactions.

Interview Questions (1)

Q1
Fractional Share Inventory Management
Data Structures & AlgorithmsHard

On our journey to democratize finance for all, we’ve created the concept of fractional shares. Fractional shares are pieces, or fractions, of whole shares of a company or ETF.

However, exchanges only trade in whole shares. Robinhood is required to manage the fractional portion of each trade.

  • If Robinhood has 0 shares of AAPL and then a customer wishes to purchase 1.5 AAPL shares, Robinhood will need to request 2 shares from the exchange and hold on to the remaining 0.5 shares.
  • If another customer requests to purchase 0.4 shares of AAPL, Robinhood can use its inventory (0.5 shares) instead of going out to the exchange and will have 0.1 shares of AAPL remaining.
  • If the third customer requests 0.5 shares, Robinhood can fill 0.1 shares out of inventory but will need to go to the exchange for an additional share leaving Robinhood's inventory at 0.6 shares.
  • If a customer requests a dollar based order, we need to convert it to the relevant number of shares and run through the above steps.
  • Always ensure the firm has a positive quantity in inventory and has under one share after handling an order. There's no need for us to hold onto whole shares!

Steps:

  • Handle buying fractional shares.
  • Handle selling fractional shares.
  • Ensure inventory is less than 1 after each order.
    • e.g. Customer sells AAPL for 0.75 and then another sells AAPL for 0.50 -- we have 1.25 inventory. We can sell 1 share to the market and keep our inventory small at 0.25.
  • Ensure inventory is always non-negative after each order.
    • e.g. Inventory is 0.2 and the customer buys 0.5 shares: ensure we end up with 0.7 shares in inventory.
  • Always “flatten”! (steps 3+4)

The final 2 digits of every integer is the decimal. e.g. 1000 = 10.00, 20 = 0.20, 100 = 1.

Example scenario:

Input:

// One AAPL buy order for 0.42 shares. AAPL is currently worth $1.
orders: [["AAPL","B","42","100"]]

// Inventory for AAPL is currently 0.99 shares. inventory: [["AAPL","99"]]

Expected Output:

// The users buys 0.42 shares from inventory, leaving us with 0.57 shares.
[["AAPL","57"]]

Another example scenario:

Input:

// One AAPL buy order for $0.42. AAPL is currently worth $1, so that's 0.42 shares.
orders: [["AAPL","B","$42","100"]]
// Existing AAPL inventory is 0.50 shares.
inventory: [["AAPL","50"]]

Expected Output:

// 0.50 - 0.42 = 0.08 shares leftover.
[["AAPL","8"]]

Follow-up

Build an inventory log for all orders from the perspective of the Inventory. The new output would be an array of two lists where the first value is the current inventory list and the second value is the new list of order logs.

The inventory log is an ordered list of type [symbol, quantity, side, contra] from the perspective of the inventory. For example:

[[“AAPL”, “100”, “B”, “MARKET”], [“AAPL”, “42”, “S”, “CUSTOMER”]]

This list means that we first bought 1 share of AAPL from the market, then sold 0.42 shares of AAPL to the customer.

[[<current list>], [<new_order_log_list>]]

  • [execution time limit] 3 seconds (java)
  • [memory limit] 1 GB
  • [input] array.array.string orders

A list of orders in the format of [$SYMBOL, $BUY_OR_SELL, $QUANTITY, $CURRENT_PRICE]. Each parameter is a string.

$SYMBOL: Can be "AAPL", "GOOGL", "MEOOOOOW" or anything really.
$BUY_OR_SELL: "B" or "S". B for BUY, S for SELL.
QUANTITY: Can be a number or a dollar amount (prefixed with $). e.g. "100" for 1 quantity or "$150" for $1.50.
CURRENT_PRICE: Current price of the symbol with no sign. e.g. "1000" for $10.

** All numbers are multiplied by 100 to store two significant digits. e.g. 100 = 1.00, 150 = 1.50, 1025 = 10.25 **

  • [input] array.array.string inventory

Inventory is a list of the inventory of each symbol. Each element in the list a 2 item list of [$SYMBOL, $QUANTITY] (remember quantity is multiplied by 100!).

An example for AAPL of 0.50 shares and GOOGL of 0.75 shares would be:

[["AAPL","50"],
["GOOG","75"]]
  • [output] array.array.string

The output is the final inventory of each symbol after iterating through each trade. This is expected to be in the same order and format as the inventory parameter.

e.g.

["AAPL","58"],
["GOOG","50"]]

Robinhood Phone Screen (System Design)
robinhood logo
Robinhood
October 21, 202519 reads

Summary

I had a phone screen interview with Robinhood, which primarily focused on a comprehensive system design challenge.

Full Experience

During my phone screen at Robinhood, the interviewer presented a fascinating system design challenge. The core task was to architect a service capable of defining, scheduling, and executing jobs reliably. I had to consider various aspects like creating and scheduling jobs, reporting on their success or failure, ensuring high reliability with strong guarantees, and enabling the viewing of logs and status for both active and completed jobs. A crucial requirement was also to handle scenarios where a job might exceed its expected runtime, adhering to Service Level Agreements (SLAs).

Interview Questions (1)

Q1
Design a Job Scheduling Service
System DesignHard

Build a service/system that can support defining and running jobs on a schedule.
Requirements:

  1. Should be able to create jobs
  2. Should be able to schedule and run jobs
  3. Should be able to report failures and successes
  4. Should be reliable and have strong guarantees about its job runs
  5. Should be able to view logs and status of running jobs, as well as previously finished jobs
  6. Should be able to handle when a job takes longer to run than expected (SLA)

Robinhood Phonescreen | L4 | July 2024
robinhood logo
Robinhood
SDE IIRejected
July 11, 20248 reads

Summary

I interviewed for an L4 role at Robinhood in July 2024, where I tackled a complex problem on managing fractional share inventory and processing trades. Unfortunately, I was rejected after the phone screen.

Full Experience

I recently had a phone screen for an L4 position at Robinhood in July 2024. The interview centered around a challenging coding problem that required me to design a system for handling fractional stock shares, including buying, selling, and managing inventory while adhering to specific rules like keeping inventory under one whole share. Despite my efforts and understanding of the problem, I was informed that I was rejected after this round.

Interview Questions (1)

Q1
Fractional Share Management System
Data Structures & AlgorithmsMedium

On our journey to democratize finance for all, we’ve created the concept of fractional shares. Fractional shares are pieces, or fractions, of whole shares of a company or ETF.

However, exchanges only trade in whole shares. Robinhood is required to manage the fractional portion of each trade.

If Robinhood has 0 shares of AAPL and then a customer wishes to purchase 1.5 AAPL shares, Robinhood will need to request 2 shares from the exchange and hold on to the remaining 0.5 shares.
If another customer requests to purchase 0.4 shares of AAPL, Robinhood can use its inventory (0.5 shares) instead of going out to the exchange and will have 0.1 shares of AAPL remaining.
If the third customer requests 0.5 shares, Robinhood can fill 0.1 shares out of inventory but will need to go to the exchange for an additional share leaving Robinhood's inventory at 0.6 shares.
If a customer requests a dollar based order, we need to convert it to the relevant number of shares and run through the above steps.
Always ensure the firm has a positive quantity in inventory and has under one share after handling an order. There's no need for us to hold onto whole shares!
Steps:

  • Handle buying fractional shares.
  • Handle selling fractional shares.
  • Ensure inventory is less than 1 after each order. e.g. Customer sells AAPL for 0.75 and then another sells AAPL for 0.50 -- we have 1.25 inventory. We can sell 1 share to the market and keep our inventory small at 0.25.
  • Ensure inventory is always non-negative after each order. e.g. Inventory is 0.2 and the customer buys 0.5 shares: ensure we end up with 0.7 shares in inventory.
  • Always “flatten”! (steps 3+4)
The final 2 digits of every integer is the decimal. e.g. 1000 = 10.00, 20 = 0.20, 100 = 1.

Example scenario:
Input:
// One AAPL buy order for 0.42 shares. AAPL is currently worth $1.
orders: [["AAPL","B","42","100"]]

// Inventory for AAPL is currently 0.99 shares. inventory: [["AAPL","99"]]

Expected Output: // The users buys 0.42 shares from inventory, leaving us with 0.57 shares. [["AAPL","57"]]


Another example scenario:
Input:
// One AAPL buy order for $0.42. AAPL is currently worth $1, so that's 0.42 shares.
orders: [["AAPL","B","$42","100"]]
// Existing AAPL inventory is 0.50 shares.
inventory: [["AAPL","50"]]

Expected Output: // 0.50 - 0.42 = 0.08 shares leftover. [["AAPL","8"]]


[execution time limit] 3 seconds (java)

[memory limit] 1 GB

[input] array.array.string orders

A list of orders in the format of [$SYMBOL, $BUY_OR_SELL, $QUANTITY, $CURRENT_PRICE]. Each parameter is a string.

$SYMBOL: Can be "AAPL", "GOOGL", "MEOOOOOW" or anything really.
$BUY_OR_SELL: "B" or "S". B for BUY, S for SELL.
$QUANTITY: Can be a number or a dollar amount (prefixed with $). e.g. "100" for 1 quantity or "$150" for $1.50.
$CURRENT_PRICE: Current price of the symbol with no $ sign. e.g. "1000" for $10.

All numbers are multiplied by 100 to store two significant digits. e.g. 100 = 1.00, 150 = 1.50, 1025 = 10.25

[input] array.array.string inventory

Inventory is a list of the inventory of each symbol. Each element in the list a 2 item list of [$SYMBOL, $QUANTITY] (remember quantity is multiplied by 100!).

An example for AAPL of 0.50 shares and GOOGL of 0.75 shares would be:

[["AAPL","50"],
["GOOG","75"]]

[output] array.array.string

The output is the final inventory of each symbol after iterating through each trade. This is expected to be in the same order and format as the inventory parameter.

e.g.

[["AAPL","58"],
["GOOG","50"]]

Have a Robinhood Interview Experience to Share?

Help other candidates by sharing your interview experience. Your insights could make the difference for someone preparing for their dream job at Robinhood.