Quant firm interview prep

Hudson River Trading interview questions

Representative quant-interview questions tagged to Hudson River Trading, concentrated in probability, combinatorics, and coding. Preview a free set below, then drill the full bank with hints and worked solutions.

147 Hudson River Trading questions · 14 free to preview · 2,516 problems total

14 practice questions

FreeProbabilityEasyHudson River TradingJane StreetSIG

A fair coin is flipped repeatedly until the first heads appears. The payout is 2n2^n dollars if the first heads occurs on the nnth toss. Determine the fair value of this game. If the expected value is infinite, output 1-1.

Solution

Let NN be the number of coin flips until the first heads appears. Since the coin is fair, NN follows a geometric distribution with success probability 1/21/2: P(N=n)=(1/2)nP(N = n) = (1/2)^n for n=1,2,3,n = 1, 2, 3, \dots (the first n1n-1 flips are tails and the nnth flip is heads). The payout when N=nN = n is 2n2^n dollars. The expected value of the payout is

E[payout]=n=12nP(N=n)=n=12n(12)n=n=11=.E[\text{payout}] = \sum_{n=1}^{\infty} 2^n \cdot P(N = n) = \sum_{n=1}^{\infty} 2^n \cdot \left(\frac{1}{2}\right)^n = \sum_{n=1}^{\infty} 1 = \infty.

Since the expected value is infinite, the game does not have a finite fair value. Per the problem instructions, output 1-1.

FreeCombinatoricsEasyHudson River TradingJane StreetSIG

Eight points are placed on a circle. All chords connecting every pair of points are drawn. Four chords are then chosen uniformly at random. What is the probability that these four chords form a convex quadrilateral?

Solution

We have 8 points on a circle, so there are (82)=28\binom{8}{2}=28 chords in total. Choosing 4 chords uniformly at random gives (284)\binom{28}{4} equally likely outcomes.

For the 4 chords to form a convex quadrilateral, their union must be exactly the boundary of that quadrilateral. Because the points lie on a circle, any 4 distinct points determine a convex quadrilateral whose sides are the chords connecting consecutive points in cyclic order. Thus a favorable set of 4 chords corresponds precisely to choosing 4 of the 8 points and taking the four boundary chords of that set. There are (84)=70\binom{8}{4}=70 ways to choose the points, and each yields exactly one favorable 4‑chord set. No other set of 4 chords can form a convex quadrilateral, since any quadrilateral must have four distinct vertices, and on a circle the only non‑self‑intersecting 4‑cycle on four points is the boundary cycle.

Hence the probability is

P=(84)(284)=7020475=144095=2585.P = \frac{\binom{8}{4}}{\binom{28}{4}} = \frac{70}{20475} = \frac{14}{4095} = \frac{2}{585}.
FreeStochasticEasyHudson River TradingJane StreetSIG

Consider a drunkard starting one pace from a precipice. On each move he steps toward the edge with chance 1/31/3 and away with chance 2/32/3; moves are independent. Determine the probability that he never goes over the edge, i.e., he escapes.

Solution

Let qkq_k be the probability that the drunkard eventually steps onto the precipice (ruin) when he is currently kk paces from the edge (k0k\ge 0). The precipice is at k=0k=0, so q0=1q_0=1. We want the survival probability 1q11-q_1.

For k1k\ge 1, condition on the first step:

qk=13qk1+23qk+1.q_k = \frac13 q_{k-1} + \frac23 q_{k+1}.

Multiply by 33 and rearrange to obtain the homogeneous linear recurrence

2qk+13qk+qk1=0.2q_{k+1} - 3q_k + q_{k-1} = 0.

The characteristic equation is 2r23r+1=02r^2-3r+1=0, which factors as (2r1)(r1)=0(2r-1)(r-1)=0, giving roots r=1r=1 and r=12r=\frac12. Hence

qk=A+B(12)k.q_k = A + B\Big(\frac12\Big)^k.

Boundary conditions.

  • At k=0k=0: q0=1    A+B=1q_0 = 1 \implies A + B = 1.
  • As kk\to\infty, the walk has a positive drift away from the edge (each step has expected change +13+\frac13). Therefore the probability of ever hitting 00 from far away tends to 00, i.e. limkqk=0\lim_{k\to\infty}q_k = 0. This forces A=0A=0, and consequently B=1B=1.

Thus qk=(12)kq_k = \big(\frac12\big)^k. In particular, the ruin probability starting one pace away is q1=12q_1 = \frac12. The probability that he never goes over the edge is

1q1=12.1 - q_1 = \frac12.
FreeCombinatoricsMediumHudson River TradingJane StreetSIG

Sandy has 55 pairs of socks in a drawer, each pair a distinct color. On Monday, she randomly picks two socks from the 1010 total; on Tuesday, she picks two from the remaining 88; on Wednesday, she picks two from the remaining 66. What is the probability that Wednesday is the first day she selects a matching pair?

Solution

Let MM, TT, WW be the events that Monday, Tuesday, Wednesday produce a matching pair, respectively. We want

P(McTcW)=P(Mc)P(TcMc)P(WMcTc).P(M^c \cap T^c \cap W) = P(M^c)\,P(T^c \mid M^c)\,P(W \mid M^c \cap T^c).

1. P(Mc)P(M^c). Total ways to choose 22 socks from 1010: (102)=45\binom{10}{2}=45. Matching pairs: 55 (one per color). So P(M)=5/45=1/9P(M)=5/45=1/9, hence

P(Mc)=119=89.P(M^c)=1-\frac19=\frac89.

2. P(TcMc)P(T^c \mid M^c). After a non‑matching Monday, two socks of different colors are removed. The remaining 88 socks consist of 33 colors with 22 socks each and 22 colors with 11 sock each. Total pairs from 88: (82)=28\binom{8}{2}=28. Only the three colors with 22 socks can produce a matching pair, so 33 matching pairs. Thus P(TMc)=3/28P(T\mid M^c)=3/28 and

P(TcMc)=1328=2528.P(T^c \mid M^c)=1-\frac{3}{28}=\frac{25}{28}.

3. P(WMcTc)P(W \mid M^c \cap T^c). After Monday and Tuesday are both non‑matching, the composition of the remaining 66 socks depends on how Tuesday's non‑matching pair was formed. Starting from the Monday state (33 colors with 22 socks, 22 colors with 11 sock), Tuesday's non‑matching pair can be of three types:

  • Case A: Both socks from the 22-sock colors. Number of ways: (32)22=12\binom{3}{2}\cdot2\cdot2 = 12. Resulting state: 11 color with 22 socks, 44 colors with 11 sock. Probability of a match on Wednesday: 1(62)=115\frac{1}{\binom{6}{2}} = \frac{1}{15}.
  • Case B: One sock from a 22-sock color and one from a 11-sock color. Number of ways: 3221=123\cdot2\cdot2\cdot1 = 12. Resulting state: 22 colors with 22 socks, 22 colors with 11 sock, 11 color with 00 socks. Probability of a match on Wednesday: 215\frac{2}{15}.
  • Case C: Both socks from the two 11-sock colors. Number of ways: 11. Resulting state: 33 colors with 22 socks, 22 colors with 00 socks. Probability of a match on Wednesday: 315=15\frac{3}{15} = \frac15.

Total non‑matching pairs on Tuesday: 12+12+1=2512+12+1 = 25, so the conditional probabilities of the cases given TcT^c are 1225,1225,125\frac{12}{25},\frac{12}{25},\frac{1}{25}. Hence

P(WMcTc)=1225115+1225215+125315=12+24+3375=39375=13125.P(W \mid M^c \cap T^c) = \frac{12}{25}\cdot\frac{1}{15} + \frac{12}{25}\cdot\frac{2}{15} + \frac{1}{25}\cdot\frac{3}{15} = \frac{12+24+3}{375} = \frac{39}{375} = \frac{13}{125}.

4. Multiply.

P(McTcW)=89252813125=82513928125=260031500=26315.P(M^c \cap T^c \cap W) = \frac{8}{9} \cdot \frac{25}{28} \cdot \frac{13}{125} = \frac{8\cdot25\cdot13}{9\cdot28\cdot125} = \frac{2600}{31500} = \frac{26}{315}.

Thus the desired probability is 26315\boxed{\frac{26}{315}}.

(One can verify by counting all sequences: total sequences (102)(82)(62)=18900\binom{10}{2}\binom{8}{2}\binom{6}{2}=18900, favorable sequences 52413=15605\cdot24\cdot13=1560, giving the same fraction.)

FreeProbabilityHardHudson River TradingJane StreetSIG

Two players share a fair coin and flip it repeatedly, recording the sequence of heads (HH) and tails (TT) that appears. The first player wins if HTHHTH occurs before HHTHHT; otherwise, the second player wins. What is the probability that the first player wins?

Solution

Idea

Track the game state as the longest suffix of the flip sequence that is a prefix of either target pattern. This yields a small Markov chain whose first-step equations determine the win probability exactly.

States and Transitions

Target patterns: Player 1 wins on HTHHTH; Player 2 wins on HHTHHT.

The transient states are {ε,H,HH,HT}\{\varepsilon,\, H,\, HH,\, HT\}, where ε\varepsilon denotes no useful suffix (start, or after a progress-resetting tail).

StateFlip HHFlip TT
ε\varepsilonHHε\varepsilon
HHHHHHHTHT
HHHHHHHHP2 wins
HTHTP1 winsε\varepsilon

Remark on HHHHHHH \xrightarrow{H} HH: after any run of heads, the longest suffix that prefixes a target is still HHHH (the length-2 prefix of HHTHHT).

System of Equations

Let psp_s denote the probability that Player 1 wins from state ss.

pε=12pH+12pε    pε=pH(1)p_{\varepsilon} = \tfrac{1}{2}p_H + \tfrac{1}{2}p_{\varepsilon} \implies p_{\varepsilon} = p_H \tag{1} pH=12pHH+12pHT(2)p_H = \tfrac{1}{2}p_{HH} + \tfrac{1}{2}p_{HT} \tag{2} pHH=12pHH+120    pHH=0(3)p_{HH} = \tfrac{1}{2}p_{HH} + \tfrac{1}{2}\cdot 0 \implies p_{HH} = 0 \tag{3} pHT=121+12pε(4)p_{HT} = \tfrac{1}{2}\cdot 1 + \tfrac{1}{2}\,p_{\varepsilon} \tag{4}

Equation (3) reflects that HHHH is a trap: every additional HH keeps the game in HHHH, and the inevitable first TT completes HHTHHT, so Player 1 cannot win from HHHH.

Solution

Substituting (3)(3) into (2)(2):

pH=12pHT.p_H = \tfrac{1}{2}p_{HT}.

Combined with (1)(1), we have pε=pH=12pHTp_{\varepsilon} = p_H = \tfrac{1}{2}p_{HT}. Substituting into (4)(4):

pHT=12+1212pHT=12+14pHT.p_{HT} = \frac{1}{2} + \frac{1}{2}\cdot\frac{1}{2}p_{HT} = \frac{1}{2} + \frac{1}{4}p_{HT}. 34pHT=12    pHT=23.\frac{3}{4}p_{HT} = \frac{1}{2} \implies p_{HT} = \frac{2}{3}. pε=1223=13.p_{\varepsilon} = \frac{1}{2}\cdot\frac{2}{3} = \boxed{\dfrac{1}{3}}.

The game begins in state ε\varepsilon, so Player 1 wins with probability 13\dfrac{1}{3}.

FreeCodingMediumHudson River TradingCitadelJump Trading

In C++, virtual functions incur a runtime penalty. Two common alternatives to mitigate this are using a function pointer or templates. Evaluate whether these approaches can improve performance, and decide if virtual functions are ultimately worthwhile despite their overhead.

Solution

A virtual function call in C++ adds overhead from an indirect branch, loss of inlining and subsequent compiler optimisations, and the per‑object vptr.

Function pointer alternative – Replacing the virtual method with a stored function pointer removes the vtable indirection but still requires an indirect call; the call cost itself is unchanged. Inlining remains impossible unless the compiler can prove the pointer value at compile time. For truly dynamic dispatch, performance is on par with virtual functions, while the code loses type safety and polymorphic extensibility.

Templates (CRTP / static polymorphism) – By resolving the target type at compile time, templates enable direct calls that are fully inlineable. This eliminates all dispatch overhead and can yield large speedups for small, frequently‑called operations. The trade‑off is the loss of runtime polymorphism: all concrete types must be known at compile time. Template instantiation may also increase binary size and compilation time.

Performance verdict – In hot inner loops where the type is statically known, templates consistently outperform virtual functions. Function pointers rarely provide a meaningful advantage; they replace one indirection with another while sacrificing design clarity. In most real‑world code, virtual function overhead is dwarfed by other costs (memory latency, I/O, algorithmic complexity) and modern branch predictors hide much of the remaining penalty.

Conclusion – Virtual functions remain the right default for runtime polymorphism. They should be replaced with templates only when profiling identifies a hot virtual call site and compile‑time dispatch is feasible. The flexibility and maintainability they offer are well worth their overhead in the vast majority of code.

ProbabilityEasyHudson River TradingJane StreetSIG

14 slips numbered 1141-14 are placed in a random order. A position ii is called a local maximum if the slip there is strictly greater than each of its immediate neighbors. Find the expected number of local maxima. For example, with 6 numbers the arrangement 513246 has local maxima at positions 1, 3, and 6, giving 3 local maxima.

Approach

Write the total number of local maxima as a sum of indicator random variables, one for each position.

CombinatoricsEasyHudson River TradingJane StreetSIG

In a single-elimination tournament with 2n2^n strictly ranked teams (higher always beats lower), the bracket is drawn uniformly at random. Find the probability that the top-ranked and second-ranked teams play each other in the final.

Verification. For a tournament with n = 2 (i.e., 4 teams total), what is the probability that the top two teams meet in the final?

Approach

Since the top-ranked team beats everyone, it always reaches the final. What must be true about the bracket placement of the second-ranked team for it to also reach the final?

BrainteaserEasyHudson River TradingJane StreetSIG

A king has 1000 bottles of wine, one of which has been poisoned by an intruder. The poison takes just under four weeks to kill, and the king needs the remaining 999 safe bottles for a party in four weeks. He has plenty of prisoners who are condemned to die. Any amount of the poisoned wine is lethal. What is the minimum number of prisoners the king needs to guarantee he identifies the poisoned bottle before the party?

Approach

Think of each prisoner as a bit that can encode information about which bottle is poisoned.

ProbabilityMediumHudson River TradingJane StreetSIG

Let hh and tt be positive integers. A fair coin is flipped repeatedly until we observe either hh more heads than tails or tt more tails than heads. What is the expected number of flips required? Compute the answer for t=10t = 10 and h=8h = 8.

Approach

Model the difference between cumulative heads and cumulative tails as a symmetric random walk starting at 0, stopping when it first hits $+h$ or $-t$.

ProbabilityHardHudson River TradingJane StreetSIG

You repeatedly roll a fair die until a 5 or 6 appears. If a 5 appears, you receive the sum of all previous rolls (excluding the 5). If a 6 appears, you receive nothing. At any point before the game ends, you may choose to stop and cash out the sum of all rolls so far. Assuming optimal play, what is the expected payout? Round to the nearest hundredth.

Approach

Model the game as a Markov decision process where the state is the current sum of rolls so far.

ProbabilityHardHudson River TradingJane StreetCitadel

Jesse has an urn containing 22 white and 33 black balls. He draws balls at random without replacement and may stop at any time. Each white ball drawn earns him $1, while each black ball drawn costs him $1. If Jesse follows the optimal stopping strategy, what is his expected net gain (or loss)?

Approach

Model the state by the number of white and black balls remaining, and define the optimal expected additional gain from that state.

Other firms & topics

Frequently asked questions

How many Hudson River Trading interview questions are on QuantGrind?

147 questions are tagged to Hudson River Trading across our 2,516-problem set, concentrated in probability, combinatorics, and coding. 14 are free to preview on this page; the full set unlocks with a membership, each with hints, the accepted answer, and a worked solution.

How hard is the Hudson River Trading quant interview?

Expect a phone screen heavy on mental math and probability, then an onsite or final round mixing brainteasers, market-making games, and topic depth. The bar is less about exotic tricks and more about speed, accuracy, and explaining your thinking clearly under time pressure.

How should I prepare for the Hudson River Trading quant interview?

Practice timed, out loud, and without a calculator. Rebuild each answer from first principles rather than recognizing it, and review the ones you got slowly — interview signal comes from how fast and cleanly you reason, not whether you've seen the exact prompt before.

Practice the full Hudson River Trading set

Every question comes with progressive hints, the accepted answer, and a full worked solution. 100 free to start — no card required.