Hudson River TradingSoftware Engineer InternAlgorithm Developer InternQuestion #36
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 the detailed step-by-step solution to this Hudson River Trading interview question, plus access to free interview prep resources.
We'll also send you a free HFT mock interview video.
More Hudson River Trading Software Engineer Intern Questions
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?What is the difference between a hash map and a map?Find the k largest values in an array in average time O(n).Given a person, what is the expected number of people you must observe before seeing someone taller than that person?
Get All 58+ Hudson River Trading Questions with Solutions
Plus 16+ hours of video lectures, resume tailoring, and 1:1 mentorship from quants.
Schedule a Call