Hudson River Trading

Interview Question

Algorithm Developer Intern Interview
Hudson River Trading

1) A pretty number is a number in base 4 whose digits are all either 1 or 0. How many pretty numbers are there less than n? 2) Given a list of moves in Reversi, return the total number of pieces for each player at the end of the game. 3) Trees are given as lists of nodes, where each node is a list with data [key, value, *children], where the order of the children matters. Two trees must be merged (left and right). For a given merged node with the same key between left and right inputs, the merged value should come from the right tree. The list of the merged node's children should start with children from the left tree's child list, and then the leftover right tree's child list. Output (key1, value1, ...) in pre-order traversal.

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!