Hudson River Trading Interview Questions
58 real interview questions at Hudson River Trading.
Showing 1–30 of 58 questions
How would you design a system to route network packets between a central hub and multiple node servers?
Given that a survey asks each student to report the size of their room and there is no other information available, how would you estimate the average room size?
Compare a sorted map and a hashmap, including their time complexities. Explain how a hashmap works and discuss strategies to resolve hash collisions.
Given two dates, calculate the number of days between them.
How does a dictionary work under the hood in Python?
What is the difference between a vector and a linked list?
Implement the stoi (string to integer) function in C, which converts a string representing an integer into its numeric value.
Given a race track with 5 lanes and 25 bunnies, with no timer and only knowing relative order per race, how many races are required to determine the top 3 fastest bunnies?
How does Java implement garbage collection?
Given an array of integers, find two numbers such that they add up to a specific target number. Follow up: What if the data type is double instead of int?
How do you implement multi-threading in an environment that does not provide kernel-level threading support?
1. Let X and Y be independent and identically distributed standard normal random variables. What is the probability that Y > 3X? Follow-up: Given that X > 0, what is the probability that Y > 3X?
You have three sock drawers: one contains red and blue socks, another contains blue and green socks, and the third contains green and red socks. What is the expected number of socks you must draw to be certain about which drawer is which, assuming each drawer has a large and equal number of each color?
(1) A 3x3x3 cube has its entire outer surface painted red. After cutting it into 27 unit cubes, one piece is selected at random and placed on a table so that five faces are visible (white). What is the probability that the remaining hidden face is red? (2) Let X be the sum of 100 rolls of a fair six-sided die, and let Y be the number of heads in 600 flips of a fair coin. What is the probability that X is greater than Y, i.e., Pr(X > Y)? (3) Place N points randomly on a circle. What is the probability that all N points lie within a semicircle?
Write a parser that can evaluate mathematical expressions given as strings.
We draw a person at random from the street. Then we continue drawing people, one at a time, until we find someone taller than the first person. What is the expected number of additional draws needed before encountering a person taller than the first?
Given an integer, find a list of unique odd numbers in ascending order whose sum is maximized and does not exceed the given integer. Return this list.
Given an array of length n, design an efficient algorithm to find the second largest number. The number of comparisons should be n + O(log n).
Design a data structure that supports push() and randompop() operations. Additionally, modify the data structure to support push() and weighted_randompop(), where the probability of popping an element is proportional to its assigned weight.
X and Y are independent and identically distributed standard normal random variables. What is the probability that Y > 3X?
You have a plate of spaghetti with n separate spaghetti strands (each with two free ends). You randomly pick two free ends and tie them together, repeating this process until no free ends remain. What is the probability that you end up with a single giant loop consisting of all the original spaghetti strands?
Given a sequence of n elements, how would you find the kth largest element?
If I have a jar with 1,000 coins and one of them is double-headed, I pick one coin at random and flip 10 heads in a row. What is the probability that I picked the double-headed coin?
Given a function that takes a sentence as a string, write the missing conditions in the if/else statements to return 'digit' if the first character is a number, 'Upper' if it is an uppercase letter, or 'Lower' if it is a lowercase letter.
Find the longest sequence of unique numbers in a binary tree starting at the root node. That is, find the longest path from the root where no number appears more than once.
Implement a system that filters a set of trades based on their timestamps and calculates the corresponding profits.
How many times do you expect to roll a die before you get a 1 on top?
Given three bowls: one contains two blue balls, one contains two red balls, and one contains one red and one blue ball. If you draw one blue ball from a bowl, what is the probability that the next ball from the same bowl is also blue?
Implement a pool allocator in C++.
How does push_back work in C++? What are its time complexities and internal workings? What are the differences between a thread and a process?
Want the full solutions?
Get detailed walkthroughs for all 58+ Hudson River Trading questions with Quant Blueprint.
Get Started