Quant Interview Questions
584 Questions
Updated 2026
Quant Interview Questions
584 questions
1
Which type of graph is best used to describe time-series data?
Graduate Trader Interview
2
What does amortized runtime mean?
SWE Intern Interview
3
Given an array of numbers, find three numbers such that their product is the maximum possible.
Quantitative Researcher Interview
4
What is the probability of landing on the Broadway street tile in Monopoly after 10 rotations? You can approximate the answer.
Intern Interview
5
Person A completes a job in 100 minutes. Person B completes the same job in 120 minutes. They work together for 30 minutes, then person C joins. Together, the three complete the job in another 20 minutes. How long would it take for person C to complete the job alone?
Quantitative Trader Interview
6
Given an array of stock prices for n days, return the maximum profit achievable using at most k transactions. Complete the function int stock(int* prices, int k, int n).
Software Engineer Interview
7
Given a simulated order book, how would you determine the fair value of a derivative?
Quantitative Trader Interview
8
You regress X1 against Y and obtain an R-squared value of 0.1. Then, you regress X2 against Y and obtain an R-squared value of 0.2. What is the maximum possible R-squared when regressing both X1 and X2 against Y together?
Quantitative Researcher Interview
9
Create a function in C++ to calculate the difference in days between two dates. Explain why your solution works.
Software Engineer Interview
10
Given a CSV file where each row contains: person name, car name, miles driven since last fill-up (float), gallons filled at this fill-up (integer), and the fill-up date, write a program to calculate the miles per gallon (MPG) for each car a person has driven during a specific date range (inclusive). Implement a function GetRangeMPG(PersonName, StartDate, EndDate) that returns a list of objects containing (CarName, MPG), where MPG is calculated as total miles driven divided by total gallons filled within the date range.
Software Developer Interview
11
Nine white cubes are arranged into a 3x3 cube and the outside surfaces are painted green. A cube is randomly selected and rolled. If the side facing up is white, what is the probability that this cube was the middle (center) cube?
Quantitative Researcher Interview
12
Julie and Quentin are playing a game in which Julie starts. They take turns flipping a coin; the first to get two heads wins. Given that the game stopped in the fourth round, what is the probability that Quentin wins?
Summer Intern Interview
13
1) What is the minimum number of moves required for a knight to reach a target square on a chessboard when a bishop is also available? 2) Implement a stack that supports push, pop, peek, as well as sum and increment operations.
Software Developer Interview
14
Implement the k-nearest neighbor algorithm.
Quantitative Developer Interview
15
Six people sit randomly around a round table. What is the probability that they are seated in increasing order by their age?
Quantitative Trader Interview
16
Write a program to output all the prime numbers smaller than a given integer N.
Quantitative Researcher Interview
17
Describe how you would store and sort the prices of items coming from multiple exchanges. Write code to demonstrate your approach.
Software Engineer Interview
18
What is the expected number of coin flips required for two players, who take turns flipping, to get two tails in a row?
Quant Trader Interview
19
How much memory is required to store a linked list with 1,000 elements?
Software Engineer Interview
20
Implement a balanced binary search tree from scratch, explain its time complexity, and optimize it to efficiently handle duplicate values.
Software Engineer Interview
21
Given a number, determine whether it can be represented as the sum of two or more consecutive integers.
Quantitative Researcher (Intern) Interview
22
There are two fair dice. For each die, you roll it again if you do not get a 6. Calculate the expected number of times you get a 6 on die 1.
Internship Interview
23
You start with 1 dollar and your friend starts with 2 dollars. You bet 1 dollar per round until one of you runs out of money. Each round, you have a 2/3 chance of winning the bet. What is the probability that you win all your friend's money before losing yours?
Assistant Trader Interview
24
Write a function to calculate Fibonacci numbers using recursion.
Quantitative Analyst Interview
25
Design an algorithm to randomly select people in a city such that the probability of selecting someone from a given district is proportional to the district's population size. Additionally, discuss how you would test your implementation and optimize its runtime, considering repeated calls to the selection function with an acceptable error margin.
Software Developer Intern Interview
26
What is the expected number of coin flips required to see 2 heads in a series of fair coin tosses?
Quantitative Researcher Interview
27
If you randomly cut a cake n times, what is the expected number of pieces?
Quantitative Researcher Interview
28
Suppose you have several random variables that all have equal pairwise correlation. What is the possible range of this correlation value?
Quantitative Researcher Interview
29
Develop an algorithm to reverse a string.
Software Developer Interview
30
Explain the Law of Large Numbers to someone with a non-STEM background. Also, explain one of the sorting algorithms to someone with a non-STEM background.
Quantitative Researcher Interview
31
What is the house edge of a standard game of roulette?
Quantitative Trader Interview
32
Implement a function to compute the nth Fibonacci number using memoization.
Software Engineer Interview
33
Given a string representation of a binary tree, write a function to parse the string and construct the tree. Then, identify and return a list of errors found in the tree, such as nodes with more than two children, more than one root, or duplicate parent-child pairs.
Software Engineer Intern Interview
34
How many nodes are there in a recombining binomial tree with n steps? How many paths lead to a particular node?
Quantitative Analyst Interview
35
What is the probability of finding two consecutive ones in a randomly generated binary string of length n, where each bit is equally likely to be 0 or 1?
Trader Interview
36
What is the probability of receiving exactly 3 heads in 5 tosses of a fair coin?
Graduate Trader Interview
37
You throw a standard die repeatedly, keeping a running total of the sums. What is the probability that when the running total exceeds 100 for the first time, the last die throw is a 2?
Quant Researcher Interview
38
Make a market on the percentage of the Earth's Equator that passes through land.
Summer Intern Interview
39
Given a string, return all possible permutations of its characters as a list. You may use recursive backtracking or any relevant Python packages.
Quantitative Researcher Interview
40
Given an array of points representing the elevations of a mountain (as a sequence of integers), and a specific position within this array, what is the highest point visible from that position?
Software Engineer Interview
41
What is the probability of rolling two sixes with a pair of standard six-sided dice?
Quant Trader Intern Interview
42
A family has children one by one until the number of daughters exceeds the number of sons by exactly one. What is the expected total number of children they will have?
Quantitative Trader Intern Interview
43
Implement a queue using a stack.
Software Engineer Interview
44
Six people are sitting around a circle. What is the probability that they are seated in increasing order of age, either clockwise or counterclockwise?
Quantitative Trader Interview
45
There are 25 horses and you want to identify the fastest 3 horses. You can race up to 5 horses at a time, and you do not have a watch to time the races. What is the minimum number of races needed to accomplish this?
Trader Interview
46
Find the largest 5-digit number such that the pairwise digit sums of its digits are all unique. Find the smallest 5-digit number with the same property. Explain why this property does not work for 7-digit numbers. Does it work for 6-digit numbers?
Trader Interview
47
Given a sorted array of integers and a target integer, can you find two numbers in the array such that their sum equals the target?
Software Engineer Interview
48
Suppose I have two pancakes: one with both sides burnt, and one with one burnt side and one unburnt side. I randomly choose one pancake, then randomly look at one of its sides. If the side is burnt, what is the probability that I picked the pancake with both sides burnt?
Trader Interview
49
How will the probability of an option ending up in the money change if the volatility of the underlying stock increases?
Quantitative Researcher Interview
50
Implement a ring buffer data structure. Write functions for both writing data to the buffer and reading data from it.
Software Engineer Intern Interview
51
There are 27 race cars and you can only race 5 of them at a time. You do not have a stopwatch. What is the minimum number of races required to determine the 3 fastest cars?
Graduate Trader Interview
52
What is the value of 3/6 + 7/4?
Trader Interview
53
I throw two fair 6-sided dice. Which expected value is larger: the expected value of the smaller number, or the expected value of the difference between the two numbers?
Quant Trader Intern Interview
54
Given a stream of stock price updates for both buy and sell orders, develop an efficient method to send and process the data to reduce overhead. Discuss considerations for using TCP versus UDP for transmitting this data.
Internship Interview
55
Implement a linear regression algorithm from scratch, without using any machine learning libraries.
Quant Trading Intern Interview
56
Explain the central limit theorem in a way that non-STEM students can understand.
Quant Research Intern Interview
57
Implement a shared_ptr smart pointer in C++ that manages reference counting and ensures proper deletion of the managed object when no references remain.
Software Engineer Interview
58
Complete a function that takes in a seqId (int) and a character (from 'a' to 'z' or '-'), where seqIds may arrive out of order. When the collected characters, sorted by seqId, form a complete message in the format '-FullMessage-', the function should print the message immediately using the provided OnComplete(msg) function.
Software Engineer Interview
59
Write a program to schedule a stream of pizza delivery orders.
Software Engineer Interview
60
You are playing a game where both you and your opponent have each put $10 in the pot. Your opponent now bets another $10. What is the minimum probability of winning required for you to call this $10 bet?
Summer Intern Interview
61
A deck contains ten cards: two 10s, two Js, two Qs, two Ks, and two As. You are dealt five cards without replacement from the deck. Compute the expected number of pairs.
Quant Trader Intern Interview
62
What is the value of (3/21) divided by (1/7)?
Trader Interview
63
What is garbage collection? How is it done in Java?
Software Developer Interview
64
In C++ templates, in what cases is the keyword 'typename' used?
Senior Software Engineer Interview
65
What is the Big O notation for common operations performed on a heap? What about operations on a hashmap?
Software Engineer Interview
66
In ridge regression, what happens to the expected value of the estimate if you perturb your data matrix?
Quantitative Researcher Interview
67
A can finish a job in 100 minutes, and B can finish the same job in 120 minutes. A and B work together on the job, but after 40 minutes, C comes to help them, and they finish the job in an additional 10 minutes. How long would it take C to finish the job by himself?
Quantitative Trader Interview
68
Describe how you would implement a queue data structure.
Software Engineer Intern Interview
69
Design a class diagram for a mock trading system.
Software Engineer Interview
70
What is the time complexity of various operations (such as insert, erase, and find) in std::set?
Software Engineer Interview
71
What is the probability that a group of people sitting around a round table are seated in strictly ascending or strictly descending order of age?
Trading Interview
72
Given two strings, return the characters that are common to both strings.
Software Engineer Interview
73
Given an n x n chessboard, return the minimum number of knight moves required to get from point (a, b) to point (c, d).
Software Engineering Intern Interview
74
What is inheritance? What is polymorphism? What is the probability that three people have their birthdays on the same day of the week?
Intern Interview
75
Given a set of numbers [a, b, c, d, e] and a target t, find the number of triplets from the set whose sum is less than or equal to t.
Software Engineer Interview
76
If N people each put their hat in a room and then each randomly pick one hat, what is the probability that a given person gets their own hat back?
Quant Research Intern Interview
77
Is an immutable object always thread safe? Explain your reasoning.
Software Engineer Interview
78
How would you calculate the final price of an asset in a trading simulation given historical trading data?
Trading Intern Interview
79
A frog is traveling from point A(0, 0) to point B(4, 6). Each step can only be 1 unit up or 1 unit to the right. The frog refuses to move three steps in the same direction consecutively. Compute the number of ways the frog can move from A to B.
Quantitative Trader Interview
80
What is the probability that a coin is biased (always lands heads), given that you observe five heads in a row?
Quantitative Trader Interview
81
Two points are randomly selected on the circumference of a circle. What is the expected distance between them?
Quantitative Research Interview
82
If you are playing a game and your opponent doubles the stakes, what probability of winning should you require to prefer accepting the doubled stakes over resigning from the game?
Intern Interview
83
Create a function in C++ to calculate the difference in days between two dates. Explain why your solution works.
Software Engineer Interview
84
James goes to the gym every Monday and Tuesday. On every other day of the week, he independently has a 30% chance of going to the gym. On a random day, James is spotted at the gym. What is the probability that it is Monday?
Quantitative Trading Intern Interview
85
What is the difference between Gaussian Naive Bayes (GNB) and logistic regression? Under what circumstances would you choose one over the other?
Quantitative Researcher Interview
86
Implement a linked list data structure in Java.
Software Engineer Interview
87
Given that the probability of getting heads on a coin flip is p, what is the expected number of flips required to get three heads in a row?
Quantitative Research Interview
88
What is implied volatility? What is the probability distribution of X + Y, where X and Y are independent and identically distributed uniform random variables?
Quantitative Researcher (Intern) Interview
89
Given two very large integers represented as strings, implement multiplication of these numbers. You cannot use built-in big integer libraries. You must represent the digits as strings, implement addition of two strings, and then use that method as part of your multiplication function. How would you handle carries correctly in your implementation?
Senior Software Developer Interview
90
Given a mapping of 7 letters to their respective Morse code representations and a string of dots and dashes (with no spaces), find all valid interpretations of the Morse code string as sequences of those letters.
Senior Software Developer Interview
91
A drunk passenger boards an airplane and sits in a random seat. Each subsequent passenger sits in their assigned seat if it is available; otherwise, they choose a random unoccupied seat. What is the probability that the last passenger will be able to sit in their assigned seat?
Quantitative Researcher Interview
92
You have r red balls and w white balls in a bag. If you keep drawing balls from the bag until only balls of a single color remain (i.e., you run out of one color), what is the probability you run out of white balls first? Express your answer in terms of r and w.
Quantitative Researcher Interview
93
What is the shape of the gamma curve for a call option?
Trader Interview
94
Implement a stack data structure in a programming language of your choice (e.g., C#), including all standard methods such as push(), pop(), and top(). The stack should accept only 12-bit integer numbers as input, and all exceptions should be handled properly. Complete this task within one hour.
Software Engineer Interview
95
Calculate the probability of having a disease given that a diagnostic test result is positive. What is the probability if the test result is positive twice?
Quantitative Researcher Interview
96
How do you reverse a string using Python?
Internship Interview
97
Two points are uniformly distributed around the circumference of a unit circle. What is the expected value of the distance between them?
Quantitative Researcher Interview
98
You have two torpedoes to hit a boat. Each torpedo has a 2/3 chance of hitting the boat. If you launch both torpedoes, what is the probability that the boat is hit?
Junior Trader Interview
99
Write a function to traverse a binary tree without using recursion.
Intern Interview
100
How is std::map implemented internally?
Quant Developer Interview
101
What is the formula to calculate the angle between the hour and minute hands of a clock at a given time?
Trader Interview
102
A fair coin is tossed repeatedly. What is the expected number of tosses required to first see the sequence 'HHH' (three consecutive heads)?
Quantitative Researcher Interview
103
Given that log X is normally distributed with mean 0 and variance 1, compute the expected value of X.
Quantitative Researcher Interview
104
How do you implement a hash map in C#?
Senior Software Developer Interview
105
Is 1599 a prime number?
Software Developer Interview
106
Using stock data from the last five years, how can we build a model to predict the next day's price?
Quantitative Researcher Interview
107
You play a game where you have $100 to split between yourself and a random person. You decide how to split it, and the other person can either accept (so you both receive the split amounts) or refuse (in which case both of you get $0 and the game ends). What split do you propose? What if the amount to split is $1,000,000?
Graduate Quant Trader Interview
108
Suppose there are 10 lions and a piece of meat. If any one of the lions eats the meat, that lion falls asleep. While asleep, any other lion can eat her and will also fall asleep. This process continues in the same way. What will happen at the beginning? Will any lion eat the meat?
Quantitative Researcher Interview
109
What is the expected number of times you need to roll a fair six-sided die to see an odd number?
Graduate Quant Trader Interview
110
Describe an algorithm for calculating the square root of x.
Software Engineer Interview
111
Since the average time complexity of a hashtable is O(1), why do we still use binary search trees? Can you describe some occasions where we use a binary search tree instead of a hashtable?
Software Engineer Interview
112
Given an array of stock prices over n days, return the maximum profit that can be achieved with at most k transactions. Implement the function int stock(int* prices, int k, int n).
Software Engineer Interview
113
How do you reverse a linked list?
Software Engineer Interview
114
Five guys walk into a bar. In how many ways can they sit so that they are arranged from oldest to youngest?
Equity Research Associate Interview
115
For the task of classifying news articles into their subject type (e.g., finance, science, politics), what is a current state-of-the-art approach? Describe this approach in detail and discuss its latency. Additionally, suggest simpler, classical models that can achieve faster throughput while maintaining high accuracy for this task.
Quantitative Researcher Interview
116
If a Binary Search Tree was implemented incorrectly such that a node has a left child that is not smaller than itself, how would you detect this violation? What is the most efficient method to identify this issue?
Software Developer Intern Interview
117
Given 20 horses and 5 tracks, what is the minimum number of races required to determine the three fastest horses, assuming you can race up to 5 horses at a time and there is no timing, only order of finish in each race?
Trader Interview
118
1. In the context of the German tank problem, explain how to construct a statistical estimator for the maximum number of tanks produced, given a sample of observed serial numbers. 2. Calculate the mean and standard deviation of this estimator.
Quantitative Researcher Interview
119
What is the expected value of the maximum of N independent normally distributed variables?
Quantitative Researcher Intern Interview
120
Calculate the value of 1.02 multiplied by (19.25 minus 0.36).
Quantitative Trader Intern Interview
121
Given an array representing user events, find the length of the longest contiguous subarray where the most frequent user in that subarray has the same number of events as the least frequent user in the entire event log. Write an efficient function to solve this problem.
Software Engineer Interview
122
What is the expected number of samples drawn from a uniform distribution on [0,1] required so that their sum exceeds 1?
Quantitative Researcher Interview
123
Given a binary tree, return all nodes whose value is greater than that of all their ancestors (i.e., nodes that are visible from the root along any path).
Software Developer Interview
124
How can a deadlock occur?
Software Engineer Interview
125
Is 1599 a prime number?
Software Developer Interview
126
Check if a given string is a permutation of a palindrome without using any additional data structures.
Software Engineer Interview
127
Suppose you and I are playing a game and have bet $10, which will go to the winner. At some point, I offer to double the bet to $20. If you accept, the game continues with the new bet; if you refuse, you lose the game and forfeit the original $10. What is the minimum probability of winning that you would need to accept the increased bet?
Junior Trader Interview
128
How many digits are there in 100! (100 factorial)?
Quantitative Researcher Intern Interview
129
What is the expected value of a single roll of a fair six-sided die?
Assistant Trader Interview
130
Implement a Stack data structure with methods such as push(), pop(), and top(), in a programming language of your choice (preferably C#). The stack should accept only 12-bit integer numbers as input, and all exceptions should be handled properly.
Software Engineer Interview
131
Given a character array representing a sentence, reverse the order of words in the sentence in place.
Intern Interview
132
1. You have two fair dice. What is the probability that their sum is a prime number? 2. Three people play a game where each flips a coin. The last person with a different result wins. What is the expected number of flips? 3. What is 17 multiplied by 23? 4. What is the square root of 2907 to two decimal places? 5. If the S&P moves 0.3% and AAPL's beta is 1.2, what is AAPL's expected move? 6. Write a function to find arbitrage opportunities in a currency exchange matrix. 7. Given real-time trade data, design an algorithm to detect wash trading. 8. Implement a fast moving median calculator for streaming data. 9. How would you arbitrage S&P 500 futures versus the underlying basket? 10. What happens to options prices during earnings announcements? 11. Design a mean-reversion strategy for ETF pairs trading. 12. 100 people wear either red or blue hats. Each person can see others' hats but not their own. They must all simultaneously guess their own hat color. They can plan beforehand. How do they maximize group survival?
Quantitative Analyst Interview
133
Design and implement a defaultdict class in Python using object-oriented design principles.
Software Engineer Interview
134
Implement a class for the game Connect Four.
Software Engineer Intern Interview
135
What is Object-Oriented Programming? Develop an algorithm to reverse a string.
Software Developer Interview
136
How can you implement a rolling mean and variance of a data stream in O(1) time per update?
Quantitative Researcher Intern Interview
137
Can an O(1) algorithm be made faster?
Software Engineer Interview
138
Provide a formal proof for the following: You have two groups of marbles—one group with 1 marble and the other with 2^n marbles. At each step, you can double the size of one group by taking marbles from the other group. Is it possible to reach a state where one group has 0 marbles and the other has 2^n + 1 marbles?
Graduate Quantitative Researcher Interview
139
How do you derive the Black-Scholes formula for pricing European options?
Quant Research Intern Interview
140
What is the expected value of the sum of the values of three randomly selected cards from a standard deck of 52 playing cards?
Quantitative Trading Intern Interview
141
1. X and Y are Gaussian variables with given parameters. Find P(X > Y), and estimate the value of X when X + Y is observed. 2. Compare the expected payoffs of taking the maximum of two dice rolls versus rolling once and having the option to roll again. 3. Given C++ code involving base and derived classes, describe the code's output and identify and fix any bugs.
Quantitative Research Associate Interview
142
Nine fair coins are tossed. What is the probability that an odd number of heads will land?
Quantitative Researcher Interview
143
Explain how to use a binomial tree to determine the price of a European call option.
Internship Interview
144
How would you explain the difference between a stack and a queue to a non-technical person?
Software Engineer Interview
145
You have one coin and your opponent has two. You flip another coin; if it lands on tails, you win one of your opponent's coins. Otherwise, your opponent wins one of your coins. The winner is the first to hold all three coins. What is the probability that you win?
Summer Intern Interview
146
Design and implement a queue data structure.
Software Engineer Interview
147
Build a linked list in Java.
Software Engineer Interview
148
A group of friends are tracking the miles per gallon (MPG) for each of their cars. Each time they fill up their gas tank, they record the following in a CSV file: person name, car name, miles driven since last fill-up (float), gallons filled at this fill-up (integer), and the fill-up date. Write a program that lets a group member determine the MPG for each of their cars during a specific time range. The principal function for querying MPG is: GetRangeMPG(PersonName, StartDate, EndDate), which returns a list of objects containing (CarName, MPG), where MPG is calculated as (total miles driven during the time period) / (total gallons filled during that time period). The query's date range should be treated inclusively.
Software Developer Interview
149
Create functions that simulate communication with exchanges and ensure that short-selling is avoided.
Senior Software Engineer Interview
150
How do you reverse a linked list?
Software Engineer Interview
151
A bag contains 30 balls: 10 black, 5 orange, 10 green, and 5 blue. Without replacement, what is the probability that the second black ball is drawn on the third draw?
Intern Interview
152
There are some fish in a bucket. Three fishermen come to the bucket one after another. The first tries to divide the fish into groups of three but finds one fish left over, so he takes this one and a third of the remaining fish. The next fisherman tries to divide the rest into three, again finds one left over, and takes that one and a third of the remainder. The third fisherman does the same. What is the minimum number of fish that could have been in the bucket initially?
Graduate Quant Trader Interview
153
Implement the native map function for arrays.
Senior Software Engineer Interview
154
Three real numbers are chosen independently and uniformly at random from the interval [0, 3]. What is the probability that the smallest number is between 0.5 and 1?
Quantitative Researcher Interview
155
You toss a fair coin repeatedly. What is the probability that the sequence HTH appears before the sequence HHT?
Quantitative Researcher Interview
156
List and explain the properties of a nilpotent matrix.
Quantitative Research Associate Interview
157
There are 27 cars and only 5 cars can race at a time. How many races are needed to determine the 3 fastest cars?
Graduate Trader Interview
158
A property has a 10% chance of containing oil, making it worth $1 million, a 30% chance of containing coal, making it worth $500,000, and if no resources are found, it can be sold for $200,000. What is the expected value of this property?
Equity Research Associate Interview
159
Implement a queue class without being able to resize memory.
Software Engineer Interview
160
Is the total number of distinct unsigned 32-bit integers different from the total number of signed 32-bit integers?
Software Engineer Interview
161
What are virtual functions in C++? How are they used?
Quantitative Researcher Interview
162
Given a list containing all numbers from 1 to n except one missing number, find the missing number.
Software Developer Interview
163
If the probability of a truck arriving in 10 minutes is 0.36, what is the probability that it arrives in 5 minutes?
Trader Interview
164
What is the expected value of a card drawn at random from a standard deck of cards, where J=11, Q=12, K=13? Then, what would this expected value become if the value of all hearts cards is doubled?
Trader Interview
165
Aaron, Bryce, and Craig are all of different integer ages. They had the following conversation: (i) Bryce to Craig: 'You're the youngest.' (ii) Aaron to Bryce: 'Your age is exactly 70% greater than mine.' (iii) Aaron to Craig: 'Your age is the average of my age and Bryce's age.' (iv) Craig to Aaron: 'I'm at least 8 years older than you.' However, not all of these statements are true. Whenever speaking to someone older, a speaker always tells the truth; when speaking to someone younger, a speaker always lies. How old is Craig?
Quantitative Analyst Interview
166
Given an n-by-n real matrix A where every entry is nonnegative and A squared (A^2) is the zero matrix, what is the maximum number of positive entries that A can have?
Quantitative Researcher Interview
167
Estimate how many ways there are to add three positive integers to obtain a sum of 25.
Quantitative Trader Interview
168
When using a virtual method, how does the machine determine to call the derived class's implementation rather than the base class implementation, under the hood?
Technology Associate Interview
169
Write a Python function to calculate the variance of a given list of numbers.
Quantitative Analyst Interview
170
Given an unsorted array of integers, find the k-th largest element in the array.
Software Engineer Interview
171
Coin A shows heads with probability 2/3, and coin B shows heads with probability 1/3. If a coin is chosen at random and flipped three times, each resulting in heads, what is the probability that the coin is coin A?
Quantitative Trading Intern Interview
172
Given an array representing a sequence of user events (where each element is a user ID), find the length of the longest contiguous subarray where the most frequent user's frequency within the subarray equals the minimum frequency of any user in the entire event log. Implement an efficient function to return this maximum length.
Software Engineer Interview
173
Is searching through a sorted binary tree (binary search tree) always more efficient in terms of complexity than binary search?
Software Engineer Interview
174
In a beer pong game with a 4x4 arrangement of cups, each time you land a ball in a cup, both the row and the column containing that cup are removed. Assuming each throw lands in any remaining cup with equal probability, what is the probability that you win the game in the minimum possible number of throws?
Quant Trader Intern Interview
175
Given randomly generated sequences of digits of increasing lengths, displayed one digit at a time, memorize each sequence and then recall and re-enter the sequence in sorted order.
Software Engineer Intern Interview
176
What is the probability of obtaining 3 heads in a row when tossing an unbiased coin 5 times?
Quant Trader Intern Interview
177
Write the code for a multi-reader/single-writer lock.
Software Engineer Interview
178
You have a 100-story building and two balls that break when dropped from too high a floor. What is the minimum number of drops needed on average to determine the highest floor from which a ball can be safely dropped?
Trader Interview
179
If a fair coin is flipped until the first heads appears, what is the expected number of flips?
Trader Interview
180
A group of people wants to determine their average salary on the condition that no individual can find out anyone else's salary. Can they accomplish this, and if so, how?
Quantitative Trader Interview
181
What is memory fragmentation, and how can it impact performance?
SWE Intern Interview
182
Can you perform binary search on a linked list? Explain why or why not.
SWE Intern Interview
183
You are given two ropes that, when lit, each burn for exactly one hour, but not necessarily at a constant rate. Which one of the following times CANNOT be measured using these ropes? a) 50 minutes b) 30 minutes c) 25 minutes d) 35 minutes.
Quantitative Trader Interview
184
Calculate the probability that a person has a disease given that the test result is positive. What is the probability if the test result is positive twice?
Quantitative Researcher Interview
185
Implement a hashtable data structure that handles hash collisions using probing.
Software Engineer Interview
186
Design a financial instrument trading system. How would you ensure atomicity, consistency, and other properties in the system?
Software Engineer Interview
187
What is the difference between LASSO and ridge regression?
Quant Research Interview
188
What is the minimum number of moves required for a knight to reach a target position on a chessboard, given that there is a bishop present which threatens certain squares? The knight cannot move to squares attacked by the bishop.
Software Engineer Intern Interview
189
Given a set of numbers [a, b, c, d, e] and a target value t, find the number of triplets in the set whose sum is at most t.
Software Engineer Interview
190
A painting has an 80% chance of being fake. If it is real, it is worth $500,000; if fake, it is worth $10,000. The seller asks for $120,000. Based on this information, should you buy the painting?
Trading Intern Interview
191
It costs $1 to play a game where you flip a fair coin four times. If you get four consecutive heads, you win $10. Should you play the game?
Intern Interview
192
What is the result of 2/5 + 11/4?
Trader Interview
193
What is the expected value of a fair six-sided die?
Trader Interview
194
How many bits are required to represent a positive integer consisting of 16 digits, with no leading zeros, in binary representation?
Graduate Software Developer Interview
195
If you toss a fair coin N times, what is the probability that you will get an even number of heads? Follow-up: Now, what if you have N - 1 fair coins, and the Nth coin is biased and lands on heads with probability p?
Quantitative Researcher Interview
196
What is the expected value of the cube of a fair six-sided die roll?
Quantitative Trader Interview
197
A painting has a 20% chance of being real and an 80% chance of being fake. If it's fake, you can sell it for $10,000; if it's real, it's worth $500,000. 1. What is the expected value of the painting? 2. If you could buy the option to purchase the painting for $100,000 after learning whether it is real or fake (but are not obligated to buy), what is the value of this option?
Intern Interview
198
Write an algorithm that replaces words in a paragraph with their corresponding synonyms from a thesaurus.
Software Engineer Interview
199
What happens to the R-squared (R^2) value if you double the data in a regression analysis? What about the t-value?
Quantitative Researcher Interview
200
What is the fair price of a call option, given the strike price and the probabilities of the underlying stock reaching specific prices?
Equity Research Analyst Interview
201
You are given two dice: one numbered 1 to 6 and the other numbered 1 to 4. You choose one at random and roll it twice. The first roll is a 2. What is the expected value of the second roll?
Trading Intern Interview
202
Given n balloons, each balloon is painted with a number on it represented by an array nums. You are to burst all the balloons. If you burst balloon i, you get nums[left] * nums[i] * nums[right] coins. Here, left and right are adjacent indices of i. After the burst, the left and right balloons become adjacent. Find the maximum coins you can collect by bursting the balloons wisely.
Quantitative Researcher Interview
203
The profits of traders A, B, and C follow independent uniform distributions from 0 EUR to 100,000 EUR. What is the probability that A > B and B > C?
Graduate Trader Interview
204
How could you implement several Java features, such as inheritance and abstract classes, in C?
Technology Associate Interview
205
Find the minimum value of the function f(x) = x^x for real x > 0.
Quantitative Researcher Interview
206
A robot is placed on a table that is 20 cm wide. The robot starts at a point 3 cm away from one of the edges. Each step, it moves either 10 cm to the left or 10 cm to the right with equal probability. What is the expected number of steps until the robot falls off the table?
Graduate Quantitative Trader Interview
207
Roll a die repeatedly until you obtain either a 5 or a 6. If you roll a 5, you cash out the sum of all previous rolls, excluding the 5. If you roll a 6, you receive no payout. You are allowed to cash out mid-game for the sum accrued up to that point. How can you maximize your expected payoff?
Quantitative Trader Interview
208
Given a CSV file as input, write a program to convert it to columnar data format.
Software Engineer Interview
209
How much would the average global sea level rise if the mass of Mount Everest was submerged into the ocean?
Trader Interview
210
Given an array of numbers: 1, 5, 3, 2, 4, 2, 3, 1, 2, 3, 2, 4, return another array where duplicate numbers are grouped in consecutive positions, maintaining the order of their first appearance. For example, the result should be: 1, 1, 5, 3, 3, 3, 2, 2, 2, 2, 4, 4.
Quantitative Researcher Interview
211
What is 72 multiplied by 73?
Trader Interview
212
How would you implement a trade matching engine? The API for it should support: (1) adding Buy/Sell orders (these methods should return a Trade if an existing order matches the new one), (2) deleting pending orders, and (3) getting market depth or demand (i.e., range of buy/sell prices and total volume of pending orders at each price).
Software Engineer Interview
213
Divide 2 by 17 to four decimal places without using any calculator or external materials.
Quantitative Trader Interview
214
What is the angle between the minute hand and the hour hand at 12:15?
Quantitative Researcher Interview
215
You throw two dice and then may choose to reroll just one of them, and only once. What is the expected value?
Quantitative Researcher Interview
216
Given a sorted array of integers, can you find two numbers such that their sum equals a target integer?
Software Engineer Interview
217
How do you implement a rolling mean and variance for a data stream in O(1) time per update?
Quantitative Researcher Intern Interview
218
What are hashmaps, and how are they implemented?
Intern Interview
219
How would you price an asset, given a list of bids and asks?
Trading Interview
220
What is the next term in the sequence: 1/1, 1/2, 1/3, 1/5, 1/8?
Quant Trader Intern Interview
221
Given a multiplication table showing values such as 2^2, 2^3, and so on, estimate the range for the value of 14^7 divided by 5^3.
Assistant Trader Interview
222
If you find a coin on the street, what is the probability that it is a biased (unfair) coin?
Quant Trader Intern Interview
223
Estimate how many digits are in 100 factorial (100!).
Internship Interview
224
There are three random variables, X, Y, Z. The correlations between each pair of variables are the same, i.e., ρ = Corr(X,Y) = Corr(Y,Z) = Corr(Z,X). What is the tightest bound you can give for ρ? How about the general case for n random variables?
Quantitative Researcher Interview
225
What is a hashmap?
Software Developer Interview
226
A boat fires torpedoes at another boat. The probability that a torpedo hits is 1/3. If a torpedo hits the boat, the boat is destroyed. Two torpedoes are fired. What is the probability that the ship is destroyed?
Assistant Trader Interview
227
How does a dictionary work?
Software Engineer Interview
228
Determine if two given words are anagrams of each other.
Software Developer Interview
229
What is the difference between concurrent and multicore systems?
Software Engineer Interview
230
Pick three numbers between 1 and 20. What is the probability that one of the numbers is the average of the other two?
Graduate Quant Trader Interview
231
You have 17 coins and I have 16 coins. We flip all the coins at the same time. If you have more heads than I do, you win; if we have the same number of heads or you have fewer, then I win. What is your probability of winning?
Assistant Trader Interview
232
What is the difference between threading and multiprocessing?
Software Engineer Interview
233
1. Given a triangle defined by its vertices, determine whether a given point is inside the triangle. 2. Given a list of times, find the number of pairs of times that add up to 60.
Software Engineering Interview
234
What is the probability that, given a random number from 1 through 1,000,000, the digit 7 appears at least once in the selected number?
Quantitative Researcher Interview
235
Flip coins sequentially until the sequence 'HT' or 'TT' appears. What is the probability that 'HT' appears before 'TT'?
Quantitative Trader Interview
236
Given n random variables from the same distribution, where the correlation between each pair of two variables is the same, what is the range of possible values for the correlation?
Quant Research Intern Interview
237
Given an exchange feed that provides up to five rows of depth information per second (five price points and their respective quantities, for both buy and sell sides of a specific stock), design and implement a more efficient solution on the server so that clients are only sent updates for price points whose quantity has changed, rather than sending all the data every time.
Senior Software Developer Interview
238
Complete the sequence: 2, 3, 5, 7, 11, 13.
Quant Trader Intern Interview
239
In a perfectly efficient market, there are two companies: A with a success probability of 2/3 and B with a success probability of 1/2. Both companies are initially worth $50 each. If both companies either succeed or fail, nothing special happens. However, if one company succeeds and the other does not, then the company that does not succeed goes bankrupt. How would the price of each company change if both succeed?
Quantitative Trader Intern Interview
240
Given 5 fair dice, what is the probability of obtaining a result where exactly 3 of the dice show the same value?
Quantitative Analyst Interview
241
Design and implement a queue data structure.
Software Engineer Interview
242
What happens if two features are highly collinear in Lasso regression?
Quantitative Researcher Interview
243
You have 1,000 bottles of wine, one of which is poisoned. You have a number of slaves you can use for testing, and you want to minimize the number of deaths while guaranteeing you find the poisoned bottle. The poison is fast-acting and fatal within an hour, and you have just over an hour before your guests arrive. Each slave can taste test any number of bottles. What strategy will allow you to find the poisoned bottle using the fewest number of slaves?
Assistant Trader Interview
244
If the probability of seeing a meteor outside within one hour is 84 percent, what is the probability of seeing at least one meteor outside in 30 minutes?
Intern Interview
245
An interviewer will play Padel against me. The interviewer, being better, has a 70% chance to win a point against me. The game is played to 11 points, but a player must win by at least 2 points. The current score is 9 to 9. What is the probability that I win the game?
Quantitative Trader Interview
246
A deck of 18 custom playing cards is numbered from 1 to 18. A card is drawn 6 times with replacement. If X is the number of draws that result in a prime number, what is the expected value of X (E(X))?
Quantitative Researcher Interview
247
What happens to the gamma of your position if you are short a straddle?
Trader Interview
248
Why do we use a hashtable, and what is its time complexity?
Software Engineer Interview
249
You can roll a fair six-sided die a maximum of two times. After each roll, you can choose to accept the current roll's value or roll again (if it is your first roll). You must accept the value on your last roll. What is the expected value of this strategy?
Junior Trader Interview
250
Draw the payoff of a put option.
Graduate Trader Interview
251
Implement a stack data structure with an additional method increment(k, v), which increments the bottom k elements of the stack by the value v.
Software Engineer Intern Interview
252
Can you reverse a string?
Internship Interview
253
Suppose you and your opponent each have three fair coins and flip all three at once. After flipping, if both of you have the same number of heads from your own coins, your opponent pays you $1. If the numbers are different, you pay your opponent $2. Should you agree to play this game?
Intern Interview
254
Implement a class for the game Connect 4.
Software Engineer Intern Interview
255
Given a binary tree, write a function to determine if it is a valid binary search tree.
Developer Interview
256
Given 25 horses and a race track where only 5 horses can race at a time, what is the minimum number of races required to determine the fastest horse?
Trader Interview
257
Given a telephone keypad display with the numbers arranged as: 1 2 3 4 5 6 7 8 9 You press a random number, then move to a random adjacent number (no diagonals), then move again to a random adjacent number (again, no diagonals). You record the three numbers in order to form a three-digit number (e.g., 569). What is the probability that the resulting number is divisible by 2?
Quant Trading Intern Interview
258
How many prime numbers are there from 1 to 10,000?
Quant Trader Intern Interview
259
Evaluate: (5/16) divided by (12/3).
Trader Interview
260
Write Python code to determine if a given integer is a prime number.
Quantitative Trader Interview
261
You are tossing a fair coin. What is the expected number of tosses until you get two heads in a row?
Trading Interview
262
Write a program to find the square root of a number.
Quantitative Researcher Interview
263
What is the worst-case construction of a binary search tree?
Technology Associate Interview
264
If you flip 8 fair coins, what is the probability that more than 4 of them are heads?
Fundamental Analyst Intern Interview
265
Reverse a given string.
Software Developer Interview
266
Given an array of integers, write a program in the language of your choice to do the following: (1) reverse the array; (2) find all perfect numbers in the array.
Software Developer Interview
267
1. What is 73 × 87? Provide your answer without using a calculator and explain your reasoning. 2. What is the probability of drawing exactly two aces from a shuffled deck of cards?
Quantitative Analyst Interview
268
What is correlation? What is covariance? Draw a graph where the correlation is equal to 1 and another where it is equal to -1.
Quantitative Researcher Interview
269
We have n switches, each with probability p_i of being on and 1-p_i of being off. What is the probability that C or more switches are on? What if C is a uniform random variable between 0 and n?
Quantitative Researcher Interview
270
What is a hashmap?
Software Developer Interview
271
Two people plan to meet at a train station. Each arrives at a random time between 4:00 pm and 5:00 pm and will wait 10 minutes for the other. What is the probability that they will meet?
Quantitative Researcher Intern Interview
272
What is the probability of rolling an increasing sequence when you roll a die three times?
Trader Interview
273
Calculate the square roots of the following numbers: 600, 6000, 60000, and 24000.
Trader Interview
274
Does searching through a sorted binary search tree always have better time complexity than performing binary search on a sorted array?
Software Engineer Interview
275
Given a matrix, if an element is 0, set its entire row and column to 0. Modify the matrix in place.
Software Engineer Interview
276
Coin A lands heads with probability 2/3, and coin B lands heads with probability 1/3. If you flip the selected coin three times and observe heads each time, what is the probability that the coin is coin A?
Quantitative Trading Intern Interview
277
Describe linear regression in detail.
Quant Researcher Interview
278
If you break a unit stick randomly in two places, what is the expected length of the smallest piece?
Quantitative Researcher Interview
279
How many ways can five people sit in a circle such that you are sitting next to your best friend?
Intern Interview
280
Determine whether two given words are anagrams of each other.
Software Developer Interview
281
If you break a unit stick randomly at two points, what is the expected length of the smallest piece?
Quantitative Researcher Interview
282
Calculate the variance of x, denoted var(x), given that the data points are distributed uniformly on the surface of a 3D sphere.
Quantitative Researcher Interview
283
In a family, the parents continue having children until they have more girls than boys. What is the expected number of children in this family?
Quantitative Trader Interview
284
Given an n-by-n real matrix A where every entry is nonnegative, and A squared is the zero matrix, what is the maximum number of positive entries A can have?
Quantitative Researcher Interview
285
Given six distinct weights labeled 101, 102, 103, 104, 105, and 106, three weights are placed on each side of a balance scale. What is the probability that the weight labeled 106 is on the heavier side of the scale?
Quant Trading Intern Interview
286
Two points are uniformly distributed around the circumference of a unit circle. What is the expected value of the distance between them?
Quantitative Researcher Interview
287
How do you estimate the square root of 5?
Quantitative Researcher Interview
288
What is the Big O time complexity of operations performed on a heap? What about a hashmap?
Software Engineer Interview
289
Explain a sorting algorithm to someone without a STEM background. Also, explain the law of large numbers to someone without a STEM background.
Quantitative Researcher Interview
290
Let A and B be two covariance matrices. Is A + B also a covariance matrix? How about A squared (A^2)? What about the product AB?
Quantitative Research Associate Interview
291
Find the number of ways to get from one corner of a grid to the opposite corner, moving only down or right at each step.
Software Engineer Interview
292
Draw a payoff diagram for a put option.
Trader Interview
293
You have a scale and 18 balls. One of the balls is slightly heavier than the rest, which are identical. What is the minimum number of times you need to use the scale to determine which ball is the heavy ball?
Quant Developer Interview
294
What is the expected number of rolls needed to see each side of a fair six-sided die at least once?
Quant Trader Intern Interview
295
What is the expected value of a fair six-sided die?
Trading Interview
296
Three random variables X, Y, and Z are such that corr(X, Y) = corr(Y, Z) = corr(Z, X) = r. Give the upper and lower bounds for r.
Summer Internship Interview
297
How would you implement a garbage collector for a programming language?
Software Engineer Interview
298
Given a graph and two vertices, implement Dijkstra's algorithm to find the shortest distance between the pair. Additionally, return an error if there are multiple shortest paths with the same distance between the vertices.
Senior Software Engineer Interview
299
If you roll two dice and add their results, what is the probability of obtaining a sum of 6?
Trader Interview
300
Three real numbers are chosen independently and uniformly at random from the interval [0, 3]. What is the probability that the smallest number is between 0.5 and 1?
Quantitative Researcher Interview
301
If a Binary Search Tree was implemented incorrectly, such that a number to the left of a node is not smaller as it should be, how would you detect this mistake? What is the most efficient way to identify such an error?
Software Developer Intern Interview
302
A submarine is targeted by two torpedoes, each with a 1/3 probability of hitting the target independently. What is the probability that at least one of the torpedoes will hit the submarine?
Assistant Trader Interview
303
Derive the Central Limit Theorem for a sequence of independent coin tosses.
Trader Intern Interview
304
We are racing, and at any time we may signal to double our bet. We have each put down 100 to start. If, during the race, I signal that I want to double the bet, what is the minimum probability of winning that you would need in order to accept continuing with the doubled bet?
Intern Interview
305
There are different levels of smokers, with some being more likely to die than others. If a person has died, what is the probability that they were a heavy smoker?
Quantitative Trading Intern Interview
306
Given four numbers, use arithmetic operations (+, -, ×, ÷) to make 24. Each number must be used exactly once.
Trading Intern Interview
307
What is the result of dividing 335 by 7?
Jr Trader Interview
308
In a 2D array of integers, adjacent positions (vertically or horizontally) are considered part of the same "country" if they contain the same integer. Given a 2D array of integers, compute the number of distinct countries in the array.
Software Developer Interview
309
What is the expected number of moves required to exit the center of a 10x10 grid, assuming you can move one step in a random direction (up, down, left, right) at each move?
Quantitative Researcher Interview
310
How do you reverse a linked list?
Software Engineer Interview
311
When rolling a fair six-sided die repeatedly, what is the probability that, before rolling any odd number, you have rolled each even number (2, 4, and 6) at least once?
Quant Trader Intern Interview
312
Nine white cubes are arranged to form a 3x3 cube, and the outside surfaces are painted green. A single cube is randomly selected and rolled. If the side facing up is white, what is the probability that the selected cube was the middle cube?
Quantitative Researcher Interview
313
Given a binary tree, return all nodes whose values are greater than those of all their ancestors (i.e., nodes that are visible from the root).
Software Developer Interview
314
Given two dates, calculate the number of days between them.
Software Engineer Interview
315
We are playing Russian roulette with a standard 6-chamber revolver. Two bullets are placed in adjacent chambers. I spin the cylinder, point the gun at my head, and pull the trigger. I survive. Now it's your turn. You can either (a) re-spin, aim at your head, and pull the trigger, or (b) not spin, aim at your head, and pull the trigger. Which option gives you a higher chance of survival? Additionally, given that I spun the cylinder, what is the probability that I die this time?
Assistant Trader Interview
316
What is the next number in the sequence: 1, 16, 7, 100, 13?
Trading Intern Interview
317
Given constraints on the correlations between three random variables, provide bounds for the correlation between one pair of them.
Trader Interview
318
You roll a die and win twice the value of the face if it is even, or the face value if it is odd. What is the fair amount to charge to play this game? If you are given the option to roll again and will only be paid based on the result of the second roll if you choose to roll again (i.e., the result of the last roll), what is the fair charge to play the game with this option?
Assistant Trader Interview
319
Given three variables x, y, and z, where x is distributed as N(0,1), z is distributed as N(0, sigma^2), and y = x + z, with x independent of z: For a given observed value of y, what is the conditional distribution of x given y, i.e., p(x|y)?
Quantitative Researcher Interview
320
You have 8 balls, one of which is slightly heavier than the others. What is the minimum number of weighings required to identify the heavier ball using a balance scale?
Graduate Trader Interview
321
Randomly generate points (x, y) on the circumference of a circle in two dimensions. What is Var(x)? What if you randomly generate points on the surface of a sphere instead?
Quantitative Researcher Interview
322
Describe how the random forest algorithm works.
Quant Trading Intern Interview
323
If 75 customers are randomly assigned to three equal-sized databases, and all partitions are equally likely, what is the probability that two randomly selected customers, Bob and Ben, are in the same database?
Quantitative Researcher Interview
324
James goes to the gym every Monday and Tuesday. On every other day of the week, he independently has a 30% chance of going to the gym. On a random day, James is spotted at the gym. What is the probability that it is Monday?
Quantitative Trading Intern Interview
325
What is covariance?
Quantitative Analyst Interview
326
Given a list of stock prices for consecutive days, determine the optimal strategy to maximize profit from buying and selling stocks. You may complete as many transactions as you like (i.e., buy and sell multiple times), but you must sell the stock before you buy again.
Quantitative Researcher (Intern) Interview
327
You have five friends of different ages going to dinner. What is the probability that they will sit in age order around the table, either clockwise or counterclockwise?
Assistant Trader Interview
328
How many levels can you build with 52 cards (a standard deck of cards)? What is the expected value (EV) of throwing a single die, and the EV of the sum of two dice rolled once and rolled 400 times? How would you create a market based on these expected values?
Trader Interview
329
Suppose you have three random variables. The correlation between A and B is 0.6, and the correlation between A and C is 0.8. What is the possible range of the correlation between B and C?
Quantitative Research Analyst Interview
330
In Python, use object-oriented design to implement a defaultdict from scratch.
Software Engineer Interview
331
Design a financial instrument trading system. How would you ensure atomicity, consistency, and other key transactional properties in the system?
Software Engineer Interview
332
Implement a service to maximize throughput by increasing the number of processes, given a fixed budget constraint.
Software Engineer New Grad Interview
333
Given an array of numbers, find the maximum value in the array.
Intern Interview
334
What makes a good hash function? Describe the key characteristics and properties that define an effective hash function.
Software Engineering Intern Interview
335
Since the average time complexity of a hashtable is O(1), why do we still use binary search trees? Can you describe some situations where a binary search tree is preferred over a hashtable?
Software Engineer Interview
336
Someone has $100 to gamble. First, he will bet $1, and if he wins, he will leave. Otherwise, he will double his bet on each subsequent round until he wins. What is his profit from this game?
Quantitative Researcher Interview
337
Find the number of ways to get from one corner of a grid to the opposite corner, moving only down or right at each step.
Software Engineer Interview
338
Two tennis players, A and B, are at deuce. Player A wins a point with a 60% chance, and Player B wins a point with a 40% chance. What is the probability that A wins the game?
Fundamental Analyst Interview
339
You are betting $50 on a basketball game and your friend is betting $20. If you win, you gain your friend's $20; if you lose, you forfeit your $50 to your friend. What is your expected profit?
Quantitative Trading Intern Interview
340
Write code to generate the Fibonacci sequence.
Trader Interview
341
Suppose you roll two fair six-sided dice. What is the probability that the sum of the two dice is equal to 8?
Quantitative Analyst Interview
342
You toss a fair coin repeatedly. What are the odds that the sequence HTH appears before the sequence HHT?
Quantitative Researcher Interview
343
How can you detect a loop in a linked list?
Quantitative Analyst Interview
344
Given a matrix and the top-left and bottom-right coordinates of a submatrix, calculate the sum of the submatrix in (1) linear time and (2) constant time. You are allowed to preprocess the matrix.
Software Engineer Interview
345
Two points are randomly selected on a circle. What is the expected distance between them?
Quantitative Research Interview
346
A painted 3x3 cube consists of 27 small cubes. If one small cube is selected at random and thrown, and you observe only the unpainted sides, what is the probability that the selected cube is completely unpainted?
Quantitative Researcher Interview
347
You roll three dice, remove any pair duplicates, and get paid the final sum. How much would you pay for a call option on this payout with a strike price of $14?
Quantitative Trader Intern Interview
348
What is an O(n log n) sorting algorithm? Give an example and briefly explain how it works.
Quantitative Researcher Interview
349
A frog is traveling from point A(0, 0) to point B(4, 6), and each step can only be 1 unit up or 1 unit to the right. The frog also refuses to move three steps in the same direction consecutively. Compute the number of ways the frog can move from A to B.
Intern Interview
350
Implement an algorithm to merge N sorted lists.
Software Engineer Interview
351
Draw a graph of profit versus price for a call option with a fee of £3. What features of this graph are of interest to traders?
Graduate Trader Interview
352
Given a matrix of size N by T, where the entry at the i-th row and j-th column represents the price of buying i shares of a stock at time j, determine the minimum total cost of purchasing N shares by the end of time T.
Quantitative Trader Interview
353
If you randomly cut a cake n times, what is the expected number of pieces?
Quantitative Researcher Interview
354
Describe a program to determine whether a given integer is a prime number.
Trader Interview
355
You have 16 watermelons and a seesaw. What is the minimum number of tests required to determine the two heaviest watermelons?
Quantitative Trader Interview
356
Given the numbers 1 to 1000 arranged around a circle in order, start at 1 and delete every alternate number (i.e., remove 1, then 3, then 5, and so on). Continue this process of deleting every other remaining number, wrapping around the circle as necessary, until only one number remains. Determine this final remaining number.
Quant Research Intern Interview
357
How does std::unordered_map work in C++? Provide an example.
Software Engineer Interview
358
What is the result of dividing 3/4 by 1/2? Show your calculations.
Quantitative Trading Intern Interview
359
Given a matrix and the coordinates of the top-left and bottom-right corners, calculate the sum of the elements within the specified submatrix in (1) linear time and (2) constant time. You are allowed to preprocess the matrix.
Software Engineer Interview
360
Given $100 to bet and the probabilities of each of 4 teams winning a bracket, how would you allocate your bet to maximize your expected return?
Trader Interview
361
What is the fair price to enter a game where you win the amount shown on a single rolled die?
Quantitative Trader Interview
362
Given an array representing the price of a stock on each day, and an integer k, determine the maximum profit you can achieve by completing at most k buy-sell transactions (you must sell before buying again).
Quantitative Researcher Interview
363
Suppose you flip 100 fair coins. What is the expected number of heads? What is the probability that exactly this many heads appear? What is the standard deviation of the number of heads?
Graduate Trader Interview
364
Given the head of a singly linked list, reverse the list and return the new head.
Software Engineer Interview
365
Why is an L2 penalty added to linear regression models? Explain the effect of the L2 penalty on the solution.
Quantitative Researcher Interview
366
How much would you pay for the option to reroll a die, given that you receive the dollar value of the number you roll, and can choose to reroll once if you wish?
Quant Trader Intern Interview
367
For a fair coin, what is the minimum, maximum, and expected (average) number of flips needed to get either 3 heads or 3 tails?
Quantitative Analyst Interview
368
Explain the difference between Lasso and Ridge regression.
Quantitative Researcher Interview
369
What is the difference between regressing y on x and regressing x on y?
Quantitative Researcher Interview
370
Write code to implement a multi-reader/single-writer lock.
Software Engineer Interview
371
Given the head of a singly linked list, reverse the list and return the new head.
Software Engineer Interview
372
You are a player on a basketball team that is losing by 2 points. You have the ball, and there are 3 seconds remaining. You have two options: pass to a teammate for a 3-point shot (with a 37% probability of making it and winning the game), or pass for a 2-point shot (with a 77% probability of making it and tying the game). In the event of a tie, your team goes to overtime, where there is a 50% chance of winning. What should you do, and why?
Assistant Trader Interview
373
Derive and explain the concept of put-call parity in options pricing.
Quant Research Intern Interview
374
What are the six inputs in an equity option pricing model?
Trader Interview
375
You and a taxman are playing a game with N cards, each labeled with a natural number from 1 to N. You can pick a card only if at least one of its factors is still on the table, and for every card you pick, the taxman takes all available factors of that card from the table. How do you maximize your score?
Quant Trader Intern Interview
376
What is the expected value of a dice rolling game where you roll two standard six-sided dice, receive the sum of the two dice unless both show the same number, in which case you receive 0?
Trading Intern Interview
377
How would you implement a queue? As a follow-up, actually build a queue using an array.
Software Engineer Intern Interview
378
Find the number of pairs of indices (i, j) in an array v such that v[i] = v[j] = v[i+1] + v[i+2] + ... + v[j-1]. Design an algorithm with time complexity O(n log n).
Software Engineer Intern Interview
379
What is the use of atomic operations in multiprocessing?
Graduate Software Developer Interview
380
What is the expected value of a six-sided die?
Trader Intern Interview
381
How would you construct an options position that is long vega and short gamma?
Trader Interview
382
Check if a string is a permutation of a palindrome without using any additional data structures.
Software Engineer Interview
383
What is the total number of ways to arrange 3 red balls, 7 blue balls, and 9 green balls in a line?
Quantitative Trader Interview
384
You have 27 horses. You can race up to 5 horses at a time. What is the minimum number of races required to determine the top 3 fastest horses?
Quantitative Trader Interview
385
How do you reverse a linked list?
Software Engineer Interview
386
Implement a shared pointer class in C++ that manages shared ownership of a dynamically allocated object. Ensure proper reference counting and memory management.
Software Engineer Interview
387
Create a class that implements a singly linked list data structure.
Quantitative Researcher Interview
388
Given the edges of a tree, output the pre-order traversal of the tree.
Software Engineer Interview
389
Suppose you want to predict y and you have predictor vectors, each with known accuracy, variance, and sample length. How do you combine these predictors to minimize the residual standard error (RSE)?
Quantitative Researcher Interview
390
Given a string, find the longest possible valid password, where a valid password is defined by specific rules (such as containing at least one uppercase letter, one lowercase letter, and one digit).
Software Engineer Interview
391
You have 12 identical balls, one of which is heavier than the rest (you don't know which). Using only a balance scale that can show which side is heavier, what is the minimum number of weighings needed to identify the heavier ball?
Quantitative Trader Interview
392
Explain how hash tables work.
Software Engineer Interview
393
Given an array v, find the number of pairs of indices (i, j) such that v[i] = v[j] = v[i+1] + v[i+2] + ... + v[j-1]. Your solution should have time complexity O(n log n).
Software Engineer Intern Interview
394
Given a sentence s and a list of word pairs, where each pair consists of strings a and b indicating that word a can be converted to word b (but not necessarily vice versa), determine the minimum length sentence you can translate the original sentence to. If there is more than one shortest sentence, return the lexicographically smallest one.
Software Developer Interview
395
You have $100 and receive an additional $100 to play a casino game where you bet on flips of a fair coin, with a 4:5 payout. You are required to bet a total of at least $500 before you can cash out. How do you maximize your expected earnings?
Quantitative Trader Interview
396
Write a method that returns a stock ticker value based on a company name found within a string of text, which may also contain random words in addition to the company name. Optimize the method for performance, assuming there could be millions of companies to search through.
Sr Software Engineer Interview
397
Given two strings, return the characters that are common to both.
Software Engineer Interview
398
Given a sentence containing three types of brackets (e.g., (), {}, []), determine if the brackets are properly balanced and in the correct order.
Software Developer Interview
399
What is the difference between bagging and boosting?
Quant Researcher Interview
400
What is a probability density function?
Internship Interview
401
You have a deck of 3 black cards and 3 red cards in random order. In a game, you turn over one card at a time; if it is red, you win a dollar, and if it is black, you lose a dollar. What is the fair price to pay to play this game?
Trader Interview
402
Reverse a string.
Software Developer Interview
403
Given an 8x8 chessboard, write code to calculate the number of ways to go from the top left corner to the bottom right corner, given that you can move down, up, left, and right.
Software Developer Interview
404
Why are the wait and notify methods declared in the Object class instead of the Thread class in Java?
Developer Interview
405
Given a list of tuples (AB, BC, AD, BE, CF), construct a binary tree and determine if it is a valid binary tree. You must check for the following five types of errors: (1) input is in the correct format; (2) no duplicate nodes; (3) the root has only two children; (4) every node is present in the tree; and (5) there are no cycles in the binary tree.
Software Engineer Interview
406
How can you generate a probability of 1/4, 1/3, or 1/π using only coin flips?
Quantitative Research Analyst Interview
407
What is the probability of getting the sequence HTH before HHT when flipping a fair coin repeatedly?
Quantitative Researcher Interview
408
What data structure is used to implement a dictionary in Python?
Quantitative Researcher Interview
409
Given a list of exchange rates between different currency pairs and an amount in one currency, convert the amount to another specified currency.
Senior Software Engineer Interview
410
There are 4 green balls and 11 red balls. What is the probability that the 4th green ball is picked on the 9th draw?
Graduate Trader Interview
411
Starting at the origin on a grid, you can move either up/down or left/right at each step. After N steps, how far can you be from the origin? Additionally, if there are two boundaries, what is the probability that you reach one boundary before the other?
Quantitative Researcher Interview
412
What is the variance of a six-sided dice roll?
Trading Intern Interview
413
What is the expected number of times you need to roll a die to get a 6?
Quantitative Trader Interview
414
Implement a Python function to price an American option using backward induction.
Quantitative Researcher Interview
415
A robot is 3 cm from the left edge and 17 cm from the right edge of a table. The robot moves with equal probability 10 cm to the left or to the right in each step. What is the expected number of steps before the robot falls off the table?
Graduate Trader Interview
416
Explain the basics of logistic regression.
Quantitative Researcher Interview
417
Given an array of integers, find the third largest number in the array.
Software Engineer Interview
418
How much memory is required to store a linked list with 1,000 elements?
Software Engineer Interview
419
Complete the function findValuation that returns the expected price of a house using linear interpolation, given arrays of historic house areas and prices. The function should round the result to the nearest integer. Function signature: findValuation(reqArea: int, area: list of int, price: list of int) -> int, where reqArea is the area of the candidate house, area[i] is the area of the ith house sold, and price[i] is its price. Constraints: 500 < reqArea < 10^5, 500 < area[i] < 10^5 for all i.
Software Engineer Interview
420
Given a sentence containing three types of brackets—parentheses (), square brackets [], and curly braces {}—determine if the brackets are properly matched and ordered.
Software Developer Interview
421
How would you solve a scheduling issue given a directed acyclic graph (DAG) of tasks and k computers? What if k is one or infinity?
Software Engineer Intern Interview
422
How does a dictionary work?
Software Engineer Interview
423
What is the probability of getting the sequence HTH before HHT when repeatedly flipping a fair coin?
Quantitative Researcher Interview
424
How would you implement a garbage collector for a programming language?
Software Engineer Interview
425
What is the difference between UDP and TCP?
Software Engineer Intern Interview
426
What is the expected value of the sum when rolling two fair six-sided dice?
Quant Trading Intern Interview
427
You have 17 coins and I have 16 coins. We flip all the coins at the same time. If you have more heads, then you win; if we have the same number of heads or you have fewer, then I win. What is your probability of winning?
Assistant Trader Interview
428
How many integers less than 100000 contain two consecutive '1's in their decimal representation?
Quant Trading Intern Interview
429
What is the use of atomic operations in multiprocessing?
Graduate Software Developer Interview
430
Can you derive the formula for ordinary linear regression?
Quantitative Researcher Interview
431
What is the probability of getting 10 heads in a row when flipping a fair coin?
Quantitative Trader - Intern Interview
432
Describe an algorithm for calculating the square root of x.
Software Engineer Interview
433
A deck of 18 custom playing cards is numbered from 1 to 18. A card is drawn 6 times with replacement. If X is the number of draws that result in a prime number, what is the expected value E(X)?
Quantitative Researcher Interview
434
Solve for x in the equation x^{x^{x^{...}}} = 2, where the power tower extends infinitely.
Assistant Trader Interview
435
1) What is the minimum number of moves required for a knight, when a bishop is also available, to reach a target square on a chessboard? 2) Implement a stack data structure that supports push, pop, and peek operations, as well as additional functions to return the sum of all elements and increment all elements by a given value.
Software Developer Interview
436
Why do we use hashtables, and what is their time complexity?
Software Engineer Interview
437
Given a biased coin (with probability p of landing heads), what is the probability of flipping two heads (HH) in two consecutive tosses?
Quant Trading Intern Interview
438
You have two strings, each of which takes exactly one hour to burn completely when lit at one end. The rate of burning is non-uniform and differs between the strings. Using only these two strings and a way to light them, how can you measure 45 minutes?
Quantitative Researcher Interview
439
Complete the function findValuation which returns the expected price of a house using linear interpolation of given data. The function must return the price rounded to the nearest integer. Function signature: findValuation(reqArea: int, area: list of int, price: list of int) -> int. Constraints: 500 < reqArea < 10^5, 500 < area[i] < 10^5 for all i.
Software Engineer Interview
440
What is the expected number of card draws before encountering an Ace in a standard 52-card deck, assuming cards are drawn one at a time without replacement?
Graduate Quantitative Researcher Interview
441
The chance that a student passes a test is 10%. What is the probability that at least 50 out of 400 students pass the test? Choose the closest answer from: 5%, 10%, 15%, 20%, 25%.
Quantitative Researcher Interview
442
If you have a dataset with many features, what methods can you use to reduce its dimensionality?
Quant Research Intern Interview
443
Two teams are playing each other, and both have positive (plus) odds to win. How much should you bet on each team, and why?
Quant Trader Intern Interview
444
Implement a balanced binary search tree from scratch and explain its time complexity. Additionally, optimize the tree to efficiently handle duplicate values.
Software Engineer Interview
445
What is garbage collection, and how is it performed in Java?
Software Developer Interview
446
You have 25 horses and a race track with 5 lanes. Each race can race at most 5 horses at a time, and you cannot use a stopwatch. What is the minimum number of races required to determine the fastest three horses?
Quant Trader Intern Interview
447
Which is larger: 2 to the power of 1/3 or 10 to the power of 1/10?
Assistant Trader Interview
448
Estimate how many basketballs can fit in a standard school bus.
Analyst Interview
449
What is the difference between a Set and a List?
Software Developer Interview
450
What is the probability of picking two diamonds and one card that is not a diamond from a standard deck of 52 cards?
Trader Interview
451
If you remove the two squares that are diagonally opposite each other from a chessboard, can you use 2x1 domino tiles to exactly cover the remaining squares?
Trader Interview
452
Six dice are rolled simultaneously. What is the probability that the sum of the numbers shown is an even number?
Graduate Quantitative Researcher Interview
453
What is the expected value when rolling two fair six-sided dice?
Summer Intern Interview
454
How would you implement a trade matching engine? The API should support: 1) adding Buy/Sell orders, which should return a Trade if an existing order matches the new one; 2) deleting pending orders; 3) getting market depth or demand, i.e., the range of buy/sell prices and total volume of pending orders at each price.
Software Engineer Interview
455
Complete a function that takes in a seqId (int) and a char (consisting of 'a'-'z' and '-'). The seqId values may be received out of order. A full message is formed when the characters, sorted by seqId, create a string in the format "-FullMessage-". The goal is to print out any full message exactly when it completes, using the provided OnComplete(msg) function.
Software Engineer Interview
456
Given a bracket of teams and their relative strengths or ratings, determine how to allocate bets on the teams to maximize expected profit and loss (PnL).
Quantitative Trader Intern Interview
457
What is a Binary Search Tree, and what is its time complexity for search, insert, and delete operations?
Software Engineer Interview
458
In C++, would you prefer to store pointers or references in a vector? Explain your reasoning.
Senior Software Engineer Interview
459
Given an encoded tree represented as a list of pairs of nodes, verify that the input is a valid tree and check whether there are any cycles in the structure.
Software Engineer Interview
460
There are three random variables, X, Y, and Z. The three correlations between the variables are equal, i.e., ρ = Corr(X, Y) = Corr(Y, Z) = Corr(Z, X). What is the tightest possible bound you can give for ρ? How about the general case for n random variables?
Quant Researcher Interview
461
Describe the data structures and algorithms needed for a program that keeps track of checked out books for a library. The program should: 1. Check out books for a member with a library card, 2. Return books, 3. Find all books that are overdue and who has them checked out, 4. Find all books that are due tomorrow. Note: New releases and popular books have shorter checkout periods than normal books.
Software Engineer Interview
462
Write a function to traverse a binary search tree using both recursive and non-recursive methods.
Technology Associate Interview
463
What is the probability of getting the sequence HHT before HTH when flipping a fair coin repeatedly?
Graduate Quant Trader Interview
464
What is the expected value of the maximum among N normally distributed random variables?
Quantitative Researcher Intern Interview
465
Design a double-ended queue (deque) data structure that supports efficient insertion and deletion from both ends. Explain the operations and their time complexities.
Software Engineer Intern Interview
466
In a sequence of fair coin tosses with each outcome being either Heads (H) or Tails (T), what is the probability that the sequence HHH appears before HTH?
Quantitative Analyst Interview
467
Let's play a game where we roll a die, and you receive a dollar amount equal to the number rolled. If you don't like the result, you may re-roll once and receive that result instead. How much would you pay to play this game?
Trader Interview
468
How many cards are needed to build a 100-storey house of cards, assuming each storey is constructed in the standard way?
Trading Interview
469
1. How would you process data by reading from a file in C++? 2. What is a vector in C++ and what is the difference between a vector and an array? Discuss memory management differences. 3. How would you debug a multithreaded implementation in C++? 4. How would you implement std::shared_ptr from scratch in C++?
Software Engineer Interview
470
Explain the concepts of a queue and a stack to a layperson.
Software Engineer Interview
471
What is the expected value of a fair six-sided die?
Quantitative Analyst Interview
472
Implement a thread pool for sending messages.
Software Engineer Interview
473
What happens to the optimal parameters of a linear regression if you feed in the same data twice? How about the R^2 and z-scores?
Quantitative Researcher Interview
474
Given an array of integers and an integer k, find the k-th largest element in the array.
Software Engineer Interview
475
If you flip 100 fair coins, what is the variance of the number of Heads?
Quantitative Trader Interview
476
What is the difference between threading and multiprocessing?
Software Engineer Interview
477
Every morning, Mike the security guard at CP High School opens all 1000 doors in the building, numbered 1 to 1000. The next guard closes all even-numbered doors. Each subsequent guard toggles (opens if closed, closes if open) every nth door, where n is the guard's number, until the 1000th guard toggles only door 1000. How many doors are left open in the end?
Assistant Trader Interview
478
What is the expected number of fair coin flips required to get two consecutive heads (i.e., 'HH') for the first time?
Quant Trader Intern Interview
479
You have 3 cards, each labeled with consecutive integers n, n+1, and n+2, where n is unknown. All cards are placed face down. On your turn, you flip one card. After seeing its value, you can either 'stay' and keep that value, or 'flip' another card. If you choose to flip another card, you can again choose to 'stay' and keep that value, or flip the final card and keep its value. Design the optimal strategy for maximizing your expected value.
Trader Interview
480
Given a standard shuffled deck of cards, you draw a card from the top. How much would you bet that the next card is higher than the one you drew? Please discuss bet sizing strategies and whether the order of the cards matters.
Quantitative Trader Interview
481
If 0.1% of people have a certain disease, and you have a test that is correct 99% of the time, what is the probability that someone who tests positive actually has the disease?
Trading Intern Interview
482
In a population, 50% do not smoke, 20% are light smokers, and 30% are heavy smokers. Heavy smokers are twice as likely to die as light smokers, and light smokers are twice as likely to die as non-smokers. What is the probability that a person was a heavy smoker given that they have died?
Trading Interview
483
You have two eggs and a 100-story building. If an egg is dropped from a floor below floor X, it will not break; if dropped from floor X or higher, it will always break. What strategy would you use to determine the exact value of X with the minimum number of drops in the worst-case scenario?
Quantitative Researcher Interview
484
Reverse a linked list in place.
Software Engineering Intern Interview
485
You and a friend each independently receive a value drawn uniformly from (0,1). After seeing your value, you can choose to switch values with your friend or keep your original value. What is the probability that you end up with a higher value than your friend at the end of the game?
Fundamental Analyst Interview
486
Two people each flip a fair coin 4 times. What is the probability that both people end up with the same number of heads?
Quantitative Trader Interview
487
Describe a stack and a queue to someone who does not have a background in data structures.
Software Engineer Intern Interview
488
Given a number, determine whether it can be represented as the sum of two or more consecutive integers.
Quantitative Researcher (Intern) Interview
489
Given a series of real numbers, what is the optimal point on the real line that minimizes the sum of the distances to all these numbers? Follow-up: What is the best algorithm to calculate the median of a sequence of numbers? Follow-up 2: Design an algorithm that can update the median of a sequence as new numbers are added.
Quantitative Researcher Interview
490
You have a worker and a gold bar. The worker will work for you for 15 days. He must have x/15 of the gold bar after the xth day of work. What is the minimum number of cuts needed to divide the gold bar so that you can pay the worker accordingly?
Software Engineer Interview
491
Implement a tic-tac-toe game.
Software Engineer Interview
492
Given two dates (for example, 12/21/2001 and 4/13/2007), calculate the number of days between them.
Software Engineer Interview
493
1. Describe your past research experience related to reinforcement learning and model explainability. 2. Explain the bias-variance trade-off in random forests. 3. What is the closed-form solution to linear regression, with and without L2 regularization?
Quant Research Intern Interview
494
Is the total number of distinct unsigned 32-bit integers different from the total number of signed 32-bit integers?
Software Engineer Interview
495
It is 9-9 in a squash match. If I have a 30% chance to win any given point, what is the probability that I win the game?
Trader Interview
496
Implement a hash table with collision handling using probing.
Software Engineer Interview
497
What is the difference between a set and a list?
Software Developer Interview
498
Given an 8x8 chessboard, write code to calculate the number of ways to go from the top left corner to the bottom right corner, where you can move down, up, left, or right at each step.
Software Developer Interview
499
How would you explain the difference between a stack and a queue to a non-technical person?
Software Engineer Interview
500
Brainteaser: If there are 27 clinks (glasses clinking) in a room, how many people are there?
Trading Interview
501
What are the ways to construct a uniform distribution given only access to a fair coin?
Quantitative Researcher Interview
502
What is the expected value of a fair 6-sided die?
Quantitative Trader Intern Interview
503
What is the probability that X > Y, where X is distributed as N(0, 2) and Y is distributed as N(0, 1)?
Quantitative Researcher Interview
504
If I roll a die and add each result to a running total, which die face value am I most likely to roll on the final roll that brings the running total to at least 1000?
Graduate Trader Interview
505
What are the assumptions of linear regression?
Quantitative Analyst Interview
506
What is the time complexity of different std::set operations?
Software Engineer Interview
507
You have a 4x4 grid and three balls. If you manage to get at least 2 balls in the same row or column, you win. What is the probability of winning?
Trader Interview
508
Write code to compute x raised to the power n (x^n) in O(log n) time.
Summer Intern Interview
509
What is the probability of rolling six consecutive 3s with a fair six-sided die?
Junior Trader Interview
510
Implement a function to compute the nth Fibonacci number using memoization.
Software Engineer Interview
511
Arrange the numbers 1 through 5 randomly around a circle. What is the expected number of numbers that are smaller than both of their neighbors?
Quantitative Trader Interview
512
Suppose we have a $10 bet. At any time, I can ask to double the bet. If you accept, we both put in another $10, so the winner gets $20. If you lose, you forfeit everything; if you reject the double, you lose the initial $10. What is the minimum probability of winning that would make you accept the double?
Junior Trader Interview
513
Given an array representing heights of points on a mountain and a starting position, what is the highest point that is visible from that position?
Software Engineer Interview
514
Implement a queue data structure class without being able to resize the underlying memory allocation.
Software Engineer Interview
515
What is the average distance between two random points on the circumference of a unit circle?
Quantitative Researcher Interview
516
Design a class diagram for a mock trading system.
Software Engineer Interview
517
Given $1, $5, $20, and $100 dollar bills, what is the fewest number of bills needed to form amounts ranging from $1 to $100? For example, $4 would require four $1 bills. Bills can be reused, so the number is not cumulative. What is the minimum number of bills you must have to always provide exact change for both a transaction of $x and $(100-x), where x < 100?
Trader Interview
518
What is the next number in the sequence: 1/2, 1/3, 1/6, 1/18, 1/108, ...?
Trader Interview
519
Sample points randomly from a unit sphere. If you generate independent standard normal variables X1, X2, X3 for the three coordinates and normalize by dividing by sqrt(X1^2 + X2^2 + X3^2), then (X1, X2, X3) / sqrt(X1^2 + X2^2 + X3^2) is a uniform random point on the sphere. What is the variance of each coordinate of the resulting uniform distribution on the sphere?
Quant Research Intern Interview
520
Explain how hash tables work.
Software Engineer Interview
521
A group of people wants to determine their average salary on the condition that no individual is able to discover anyone else's salary. How can they accomplish this?
Assistant Trader Interview
522
What are the first 5 decimal digits in the decimal expansion of 1/13?
Trader Interview
523
Price an option where the underlying asset is the outcome of a fair six-sided die roll.
Fundamental Analyst Interview
524
You start a tennis game at a score of 30-30. You have a probability of 0.6 of winning each point. What is the probability that you win the game?
Trader Interview
525
Reverse the words in a sentence string in-place.
Software Engineer Interview
526
Consider a game where you flip a fair coin: if it lands heads, you win $20, and if it lands tails, you lose $5. Would you like to play this game? In a second game, the payouts are $20 million for heads and lose $5 for tails. Would you prefer the second game? Lastly, if the payouts return to $20 for heads and -$5 for tails, but you can choose to play either once or 100 times, which option do you prefer and why? Please explain your reasoning.
Graduate Trader Interview
527
What is the square root of 30,000 (calculated mentally)?
Trader Interview
528
If you toss 100 fair coins, what is the probability of getting more than 60 heads?
Quantitative Research Associate Interview
529
Implement a queue using a stack.
Software Engineer Interview
530
Implement a Tic-Tac-Toe game.
Software Engineer Interview
531
What is the difference between ordinary least squares (OLS) regression and Ridge regression?
Quantitative Researcher Interview
532
Identify any arbitrage opportunities, if any, in the given matrix of currency conversion rates.
Quantitative Researcher Interview
533
Draw the payoff diagrams for buying and selling a call option and a put option.
Trading Interview
534
1. A painted 3x3 cube consists of 27 small cubes. If one small cube is selected at random and thrown, and upon landing only its unpainted sides are visible, what is the probability that this cube is completely unpainted? 2. Eight people are sitting around a table. If three are selected randomly, what is the probability that at least two of the selected people were sitting next to each other?
Quantitative Researcher Interview
535
How would you solve a scheduling issue given a directed acyclic graph (DAG) of tasks and k computers? What if k is one or infinity?
Software Engineer Intern Interview
536
Calculate the Sharpe ratio of a 60/40 coin toss where each toss results in a gain of $1 or a loss of $1, respectively.
Internship Interview
537
Write a program to check if a given input string is a palindrome.
Technology Associate Interview
538
A fair coin is tossed repeatedly until either the sequence HHT or HTH occurs. What is the expected number of tosses required?
Graduate Trader Interview
539
You have a worker and a gold bar. The worker will work for you for 15 days. He must have x/15 of the gold bar after the xth day of work. What is the minimum number of cuts you need to make to the gold bar to pay the worker accordingly?
Software Engineer Interview
540
Is an immutable object always thread safe?
Software Engineer Interview
541
What is 3 plus 5 equal to?
Quantitative Trader - Intern Interview
542
Assign A=1, B=2, ..., Z=26. Find an eight-letter English word such that the sum of the letter values is less than 50.
Trader Interview
543
What is the expected value of a single six-sided dice roll if you are allowed to re-roll once, and keep the higher number from the two rolls?
Trader Interview
544
What is the minimum number of cards required to build a card tower with 100 levels, given that you need 2 cards for 1 level, 7 for 2 levels, and so on?
Graduate Trader Interview
545
Approximate the probability of getting exactly 50 heads in 100 tosses of a fair coin, not as a combinatorial expression, but as a percentage or a simplified fraction.
Quantitative Trading Intern Interview
546
What is the square root of 800 rounded to two decimal places?
Trader Interview
547
Given an array of integers, find the maximum possible sum of any non-empty contiguous subarray.
Graduate Software Engineer Interview
548
We have three pancakes. One is burnt on both sides, one is burnt on one side, and one is not burnt at all. The pancakes are stacked on a plate so that all that can be seen is a burnt side on top. What is the probability that the fully burnt pancake is the one on top?
Quant Researcher Interview
549
How do you generate a uniform distribution over a disk given access to two independent uniform random variables?
Quantitative Trader Interview
550
Given a vector of edges (e.g., A-B, A-C, C-D), write a function to determine if the resulting graph is a tree. If it is a tree, return its root.
Quantitative Developer Interview
551
People are waiting for an elevator in a hotel that has floors numbered 0 to M. The elevator has a limit of X people and a weight limit of Y. There are N people standing in a queue at the ground floor. You are given two arrays: A[N], where each element is the weight of a person, and B[N], where each element is the floor each person wants to go to. The elevator goes up, stopping at each requested floor, then returns to the ground floor. Write a solution to determine how many times the elevator will stop.
Software Developer Interview
552
What is the probability of getting a three-of-a-kind in Texas Hold'em poker?
Trader Interview
553
Write a function that takes an integer array as input and returns a boolean indicating whether the array contains any duplicate values.
Software Developer Intern Interview
554
What is the limit of x^x as x approaches 0?
Quantitative Researcher Interview
555
Five people are sitting at a circular table. What is the probability that they are seated in the order of their birthdays?
Graduate Trader Program Interview
556
If you have 8 marbles and one is lighter than the rest, how would you determine which one is lighter using a balance scale in two weighings?
Equity Research Associate Interview
557
A painting is on sale for X amount. The probability that it is real is Y. If it is real, it is worth A; if it is a fake, it is worth B. What is the expected gain on purchasing this painting?
Quantitative Trader Interview
558
Explain why the volatility smile exists.
Trading Interview
559
Out of 100 fair coin flips, what is the probability that you get at least 10 more heads than tails?
Quant Trading Intern Interview
560
In a 2D array of integers, adjacent positions (vertically or horizontally) are considered part of the same 'country' if they contain the same integer. Given a 2D array of integers, compute the number of distinct countries in the array.
Software Developer Interview
561
How would you run a Monte Carlo simulation in Python to predict the probability of obtaining 4 out of 6 coins as heads, without using for loops?
Quantitative Analyst Interview
562
What is a race condition?
SWE Intern Interview
563
What is the expected value (EV) of a standard six-sided dice roll?
Quantitative Trader Interview
564
Return a minimum-length list of perfect squares whose sum equals a given value k.
Software Engineering Intern Interview
565
There is a 20 cm long table. You start 3 cm from the left edge. Each move, you go either 10 cm to the left or to the right with equal probability. If you reach either edge of the table, you fall off immediately. How many moves do you expect to make before falling off?
Trading Intern Interview
566
How many bits are required to represent a positive integer with exactly 16 digits and no leading zeros, in binary representation?
Graduate Software Developer Interview
567
You are given an array of integers, which may include both negative and positive values, and another integer S. Find three different integers in the array whose sum is closest to S. If multiple solutions exist, any is acceptable. Is there an algorithm to find the three integers in O(n^2) time?
Quantitative Research Analyst Interview
568
1) Given a chessboard size, a knight's starting position, an end position, and a bishop's position, find the minimum number of moves required for the knight to reach the end position. The knight cannot move to any square that the bishop is attacking, unless it captures the bishop on that square. 2) Implement a stack with the following functions: pop, push, inc, isEmpty, and peek. The inc function should increase the first n elements of the stack by a value i.
Software Engineering Intern Interview
569
Given two sorted arrays, find the median of the combined arrays. Explain your algorithm and discuss how you would handle edge cases.
Software Engineer Interview
570
Describe the data structures and algorithms you would use to design a program that keeps track of checked-out books for a library. The system should be able to: 1) Check out books for a member who has a library card, 2) Process book returns, 3) Find all books that are overdue and identify who has them checked out, and 4) Find all books that will be due tomorrow. Note: New releases and popular books have shorter checkout periods than normal books.
Software Engineer Interview
571
Given the probabilities of an event occurring on each of two days, find the probability that the event occurs on at least one of those days.
Trading Intern Interview
572
Why is regularization important, for example using ridge or lasso regression compared to ordinary least squares (OLS), even when the number of samples is greater than the number of parameters?
Quantitative Research Interview
573
Compress a string such that repeated characters are replaced by the character followed by the number of repetitions. For example, given 'AAABBCC', output 'A3B2C2'.
Senior Software Engineer Interview
574
Mickey and Minnie plan to meet at a cafe, but each will independently arrive at a uniformly random time between 9:00 and 10:00. Mickey will wait 10 minutes for Minnie before leaving, and Minnie will wait 30 minutes for Mickey before leaving. What is the probability that they meet each other?
Quantitative Analyst Interview
575
Analyze the variance of a momentum trading strategy.
Quant Research Intern Interview
576
What is the smallest multiple of 77 that is greater than 70,000? What about 700,000?
Trader Interview
577
Design a random number generator that, given a list of probabilities corresponding to a discrete set of outcomes, outputs each outcome with its specified probability.
Software Engineer Interview
578
How would you design a machine learning algorithm that uses Twitter data to generate a trading strategy?
Quantitative Analyst Interview
579
What is a pointer and a shared pointer? How do you manage object ownership using these in programming?
Software Engineering Intern Interview
580
Write a function to determine whether a given point lies within a triangle in 2D space.
Technology Associate Interview
581
What is a hash tree?
Technology Associate Interview
582
I have a painting. If it is an original, it is worth $500,000; if it is not, it is worth $10,000. The probability that it is an original is 0.2. I have an option to pay $100,000 for the painting after inspection. What is the value of this option?
Assistant Trader Interview
583
1. Find the longest possible valid password in a given string. 2. Find the total number of stops an elevator takes to serve X people. 3. Find the number of unique countries in a 2D matrix.
Software Engineer Interview
584
What is the expected number of rolls of a fair six-sided die required until each face has appeared at least twice?
Semi-Systematic Trader Interview
Disclaimer: These questions do not represent any company in any way. They are sourced from a combination of places including interviewees and public sources. They may not be accurate or reflective of any company's actual interview process.