Reported September 2026
Robinhoodgraph

Service Dependency Load Factors

Reported by candidates from Robinhood's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Robinhood OA. Under 2s to a working solution.
Founder's read

Robinhood reported this one in September 2026, and it looks like a graph problem wearing a design costume. Strip the service-dependency story and it's path counting in a DAG: how many paths lead from the entry to each node. If you've got an OA invite and 48 hours, this is the one to recognize on sight. Topological order, one pass, done. Then sort the names and format strings. StealthCoder is there as a safety net on the live OA if you blank on the ordering step, but the idea fits in one sentence.

The problem

A collection of services forms a directed acyclic dependency graph. The string names[i] identifies service i, and each pair [u, v] in dependencies means that service u calls service v once for every unit of load received by u.
Exactly one unit of external load enters service entry. Every service passes each unit it receives to each of its dependencies. Contributions arriving along different paths add together.
Return one string of the form name load for each service reachable from entry, including entry itself. Use one space between the service name and its decimal load, and sort results lexicographically by service name. Omit unreachable services entirely.
The entry service has load 1. A service called by two different loaded services can have load greater than 1, even though it appears only once in the output. Dependencies belonging to unreachable services contribute no load.

Function
serviceLoads(names: String[], dependencies: int[][], entry: int) → String[]

Examples
Example 1
names = ["api","billing","search","db","unused"]
dependencies = [[0,1],[0,2],[1,3],[2,3]]
entry = 0
return = ["api 1","billing 1","db 2","search 1"]
The entry api gives one unit to both billing and search. Each sends one unit to db, so its load is 2. The service unused is omitted.
Example 2
names = ["target","root","unused"]
dependencies = [[1,0],[2,0]]
entry = 1
return = ["root 1","target 1"]
Only root receives external load. It sends one unit to target; unused contributes zero even though it also has an edge to target.

Constraints
1 <= names.length <= 60.
Service names are distinct and contain 1 through 20 lowercase English letters.
0 <= dependencies.length <= 500.
Every edge contains two distinct valid service indices. No directed edge is repeated, and the entire graph is acyclic.
0 <= entry < names.length.
All load counts fit in a signed 64-bit integer.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick: load[v] equals the sum of load[u] over every edge u to v, starting with load[entry] = 1. Because the graph is acyclic, process nodes in topological order so every parent is final before its children get any load. Run Kahn's algorithm, or DFS post-order reversed, but only from the entry. The common pitfall is counting edges from unreachable services. In Example 2, unused has an edge to target but contributes zero. Fix it by only pushing load from nodes that are reachable, or by starting the topological pass from the entry's reachable subgraph. Another pitfall is using visited-set DFS and counting each node once, which loses the multiple-path sums. Use 64-bit integers, since loads can get huge. Finally, sort by name, not index, and skip nodes with zero reachability. StealthCoder can hand you the working structure live if the topological ordering slips your mind mid-assessment.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Service Dependency Load Factors cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Robinhood's OA.

Robinhood reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Service Dependency Load Factors FAQ

What's the actual trick in Service Dependency Load Factors?+

It's counting paths from the entry in a DAG. Set entry load to 1, process nodes in topological order, and add each node's load to every child. Each node's final load is the sum of its parents' loads. No cycles means no special handling.

How do I handle unreachable services?+

Only propagate load from nodes that have received load, or restrict the topological pass to nodes reachable from the entry. Unreachable nodes never get a positive load, so skip them in the output. Their outgoing edges must not add anything, as Example 2 shows.

Why can't I just DFS with a visited set?+

A visited set counts each node once, but load sums across all paths. In Example 1, db gets 2 because two parents each send 1. Either do a topological pass, or memoize path counts per node rather than marking nodes visited and skipping them.

How hard is this for a Robinhood OA?+

Medium-ish. The code is short, but you have to see it as path counting and remember topological order. With 60 nodes and 500 edges, performance isn't an issue. The mistakes are usually in output formatting, sorting by name, and unreachable edges.

How do I prepare for this in 48 hours?+

Write Kahn's algorithm from memory twice. Then write a variant that accumulates a count per node along edges. Practice sorting strings and formatting the name, a space, and the number. Test on both examples, especially the one with an unreachable parent pointing into a reachable node.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Robinhood.

OA at Robinhood?
Invisible during screen share
Get it