Quant interview questions
1,322 questions in the style trading and research firms ask, from probability and brainteasers to options, statistics and coding. Every question is open to read; the 50 in the free sample show their worked solutions here.
149 questions · page 2 of 4 · Clear filters
- When does a hash map lookup degrade to linear time?Data structures and algorithms · Applied
- What is the expected number of fair coin flips to see two heads in a row?Data structures and algorithms · Applied
- Your shortest-path graph has some negative edge weights but no negative cycles.Data structures and algorithms · Applied
- How many iterations does the loop while (x) { x &= x - 1; n++; } make on x = 255?Data structures and algorithms · Applied
- What is the edit distance between "kitten" and "sitting"?Data structures and algorithms · Applied
- What most often decides whether a dynamic programming solution is feasible?Data structures and algorithms · Applied
- What does the recurrence T(n) = 4T(n/2)+Θ(n²) solve to?Data structures and algorithms · Applied
- A dynamic array starts with capacity 1 and doubles when full, copying all elements.Data structures and algorithms · Applied
- You insert 1,000 keys into a hash table with 1,000 buckets using a uniform hash.Data structures and algorithms · Applied
- You implement a queue with two stacks: push onto the inbox, and pop from the…Data structures and algorithms · Applied
- How many structurally different binary search trees can hold the keys 1,2,3,4,5?Data structures and algorithms · Applied
- What is the running time of Dijkstra’s algorithm with a binary heap, on a graph…Data structures and algorithms · Applied
- A graph has edges A–B (weight 1), B–C (2), A–C (3), C–D (4) and B–D (5).Data structures and algorithms · Applied
- What is the largest sum of a contiguous subarray of [−2,1,−3,4,−1,2,1,−5,4]?Data structures and algorithms · Applied
- What is the length of the longest substring of "abcabcbb" with no repeated characters?Data structures and algorithms · Applied
- What is the length of the longest strictly increasing subsequence of…Data structures and algorithms · Applied
- Items have weights 1,3,4,5 and values 1,4,5,7.Data structures and algorithms · Applied
- With coins of 1, 5, 6 and 9, what is the fewest coins that make 11?Data structures and algorithms · Applied
- What is 1oplus2oplus3oplus⋯oplus10, where oplus is bitwise XOR?Data structures and algorithms · Applied
- Computing x¹³ by binary exponentiation (repeated squaring), how many…Data structures and algorithms · Applied
- You need prefix sums with point updates on a large array. Fenwick tree or segment tree?Data structures and algorithms · Advanced
- Strassen’s matrix multiplication satisfies T(n) = 7T(n/2)+O(n²).Data structures and algorithms · Advanced
- With both union by rank and path compression, what is the amortised cost of a…Data structures and algorithms · Advanced
- Parcels weighing 1,2,…,10 must ship in order within 5 days, each day’s load…Data structures and algorithms · Advanced
- Any comparison sort must, in the worst case, make at least ⌈log₂n!⌉ comparisons.Data structures and algorithms · Advanced
- What happens with def f(x, acc=[]): acc.append(x); return acc?Python and data for quants · Foundation
- How much memory does a 5,000 × 5,000 float64 NumPy array use, in megabytes?Python and data for quants · Foundation
- A US equity session runs 6.5 hours. How many five-minute bars does it contain?Python and data for quants · Foundation
- An equity curve runs 100, 120, 90, 110. What is the maximum drawdown, as a decimal?Python and data for quants · Foundation
- What is sum([i * j for i in range(3) for j in range(3) if i != j])?Python and data for quants · Foundation
- What does -7 // 2 evaluate to in Python?Python and data for quants · Foundation
- After g = (x for x in range(3)) and list(g), what is len(list(g))?Python and data for quants · Foundation
- When should you compare with is rather than == in Python?Python and data for quants · Foundation
- How many elements does the result of adding NumPy arrays of shapes (3, 1) and (1, 4) have?Python and data for quants · Foundation
- The New York equity open is 9:30 local time.Python and data for quants · Foundation
- You test x in container millions of times against a fixed collection of 100,000 ids.Python and data for quants · Foundation
- Roughly how much memory does a list of ten million distinct Python integers…Python and data for quants · Applied
- You slice a[::2] and then modify the result. What happens to a?Python and data for quants · Applied
- You add two pandas Series with partly different indexes. What do you get?Python and data for quants · Applied
- A $100 stock goes ex-dividend by $2.Python and data for quants · Applied