Hudson River Trading

Hudson River Trading Software Engineer Interview Questions

16+ questions from real Hudson River Trading Software Engineer interviews, reported by candidates.

16
Questions
5
Round Types
6
Topic Areas
2022-2025
Year Range

Round Types

OA 8 Recruiter 3 Phone 3 Phone Screen 1 Onsite 1

Top Topics

Questions

I recently had an interview for a C++ new grad position at HRT. The interview lasted 30 minutes; we introduced ourselves and then it quickly began. The question was: Design a game. The board has 9x9 d

Just received the Hudson River Trading OA for their SWE intern role, by their description it is not the standard GCA through CodeSignal since it is only three questions and 2 hours long. Anyone have a

Hey everyone! I recently received an invitation to complete an online assessment for a C++ Software Engineer role at Hudson River Trading, and I’m excited (and a bit nervous) about what to expect. The

I'm applying for the Algo dev role (London) and trying to prepare. Apparently 90 mins to solve 3 hard leetcodes and 1 pandas question, yikes Anyone remember what questions came up?

What can I expect for the virtual onsite? What types of questions can I expect and what subjects to should I review? I’d love to hear any and all details!

I just got past the HRT Python swe intern OA and now I have a recruiter screening phone call coming up. Does anyone have any insight as to what they might ask/what the process will look like going for

Hi! Got the algo dev new grad phone screen coming up. Anyone knows what it’s gonna be like? I’ve interviewed with JS, IMC, headlands before and was wondering if it’s similar.

Hey I have an OA coming up for HRT Algorithm Developer. There aren\'t many problems tagged on leetcode. If anyone has taken it recently, would love to hear thoughts on...

Hi, Has anyone before appeared for the above role? Can you tell me what are the questions I can expect? Is it core python based questions or more LC kind questions?

Preparing for an upcoming phone screen, but I can only find information for the regular SWE/Core position. Can anyone suggest what I do to prepare, given that my interview is in slightly more than a w

## Problem Simulate an auction or order book exchange: match buy/sell orders by price-time priority. Likely involves heaps or sorted structures for order matching. ## Likely LeetCode equivalent No direct match. ## Tags coding, heap, simulation, trading

## Problem You are given a list of chemical reaction rules: `A + B -> C` means combining elements A and B produces C. Given an initial set of elements, simulate the reactions until no more reactions are possible, then return the final stable set. Reactions trigger in any order when the required elements are both present. An element is consumed when it participates in a reaction. ```python def simulate_reactions( initial: list[str], rules: list[tuple[str, str, str]] # (reactant1, reactant2, product) ) -> list[str]: ... ``` ``` rules: [("H","O","W"), ("W","C","X"), ("H","N","Y")] initial: ["H", "H", "O", "C", "N"] Step 1: H+O -> W remaining: [H, C, N, W] Step 2: W+C -> X remaining: [H, N, X] Step 3: H+N -> Y remaining: [X, Y] No more rules apply. Output: ["X", "Y"] ``` ## Follow-ups 1. The order of reactions can affect the final state (some reactions compete for the same element). How would you detect and report all possible stable end states? 2. What data structure lets you efficiently find which rules are currently triggered given the current element multiset? 3. How do you detect infinite loops (A+B->A+B is a degenerate rule)? 4. Extend to support catalytic reactions where element C is consumed then reproduced (e.g. C remains after A+B+C->D+C).

## Problem Given source code as a string, compute its length after stripping all comments (single-line and block comments). Involves careful string parsing and state tracking. ## Likely LeetCode equivalent No direct match. ## Tags strings, parsing, coding, oa

## Problem Given an integer `n` and a list of integers `factors`, find the smallest integer strictly greater than `n` that is divisible by every element in `factors`. ```python def smallest_divisible(n: int, factors: list[int]) -> int: ... ``` ``` Input: n=10, factors=[3, 4] LCM(3,4) = 12 Smallest multiple of 12 > 10 -> 12 Output: 12 Input: n=12, factors=[3, 4] Must be STRICTLY greater than 12 -> 24 Output: 24 Input: n=0, factors=[5, 7] LCM=35, first multiple > 0 -> 35 Output: 35 ``` ## Follow-ups 1. How do you compute the LCM of a list of numbers? Walk through the GCD-based approach. 2. What is the time complexity of your solution and what are the edge cases (e.g., factors contains 1, or factors contains duplicates)? 3. What if `n` can be up to 10^18? Does your integer arithmetic still work in Python? In Java/C++? 4. Generalize: find the K-th integer greater than N divisible by all factors. How does the formula change?

## Problem Two players alternate turns. There is a token on integer position `pos` on a number line. Each turn the current player moves the token left or right by any value in a given set `moves` (e.g., `{1, 3}`). A player who moves the token to position 0 wins. A player who cannot move (or is forced to move off the line) loses. Given `pos` and `moves`, determine if the first player wins with optimal play. ```python def first_player_wins(pos: int, moves: set[int]) -> bool: ... ``` ``` moves = {1, 3}, pos = 4 Winning positions (W) vs losing positions (L): pos=0: W (you just won) pos=1: W (move 1 -> 0) pos=2: L (can go to 1 or ... 1 is W for opponent; -1 invalid) pos=3: W (move 3 -> 0) pos=4: L (move 1->3 W for opp, move 3->1 W for opp) Output: False (first player loses) ``` ## Follow-ups 1. This is a combinatorial game theory problem. Describe the DP recurrence for `is_winning(pos)`. 2. What is the time complexity of your DP solution, and what is the memoization base case? 3. How does the problem change if moves can also increase `pos` (bidirectional movement)? 4. Extend to a 2D grid: the token is at `(r,c)`, allowed moves are `{up, down, left, right}`. The player who reaches `(0,0)` wins. How do you adapt your solution?

## Problem Given a string `s`, find the minimum number of characters to insert (at any positions) to make `s` a palindrome. Also return the count of distinct palindromes that can be formed with exactly that many insertions. ```python def min_insertions_palindrome(s: str) -> tuple[int, int]: """Returns (min_insertions, count_of_distinct_palindromes).""" ... ``` ``` Input: s = "ab" Min insertions: 1 (insert 'a' at end -> "aba", or insert 'b' at start -> "bab") Distinct palindromes: 2 Output: (1, 2) Input: s = "aab" Min insertions: 1 ("aaba" then? No... insert 'a' at end -> "aaba" not palindrome) Correct: insert 'b' before first 'a' -> "baab" YES, or insert 'a' -> "aabaa" YES Output: (1, 2) ``` ## Follow-ups 1. The minimum insertions equal `n - LPS(s)` where LPS is the Longest Palindromic Subsequence length. Prove this. 2. How do you count distinct palindromes? Walk through your approach, handling duplicate characters carefully. 3. What is the time and space complexity of the LPS DP? Can you optimize space from O(n^2) to O(n)? 4. Extend: what is the minimum number of deletions (not insertions) to make `s` a palindrome?

See All 16 Hudson River Trading Software Engineer Questions

Full question text, answer context, and frequency data for subscribers.

Get Access