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.
55 questions · page 1 of 2 · Clear filters
- A root-finding guarantee, part 1 of 3Data structures and algorithms · Foundation
- You need the 100 largest values from a stream of 10⁹ numbers you cannot store.Data structures and algorithms · Foundation · Free solution
- How many comparisons does a binary search need, in the worst case, over a…Data structures and algorithms · Foundation
- A balanced binary search tree holds one million keys.Data structures and algorithms · Foundation
- What is the maximum number of edges in a directed acyclic graph on ten vertices?Data structures and algorithms · Foundation
- How many set bits does the integer 90 have?Data structures and algorithms · Foundation
- How many non-empty contiguous subarrays does an array of length ten have?Data structures and algorithms · Foundation
- How many times does the inner body run in for i in range(1000): for j in range(i): body()?Data structures and algorithms · Foundation
- What is the height (edges on the longest root-to-leaf path) of a binary heap…Data structures and algorithms · Foundation
- A dependency graph has edges a → b, a → c, b → d, c → d.Data structures and algorithms · Foundation
- You climb a staircase of 10 steps, taking one or two steps at a time.Data structures and algorithms · Foundation
- For a positive integer x, which test is true exactly when x is a power of two?Data structures and algorithms · Foundation
- Searching a sorted array, part 1 of 3Data structures and algorithms · Foundation
- Converting between currencies, part 1 of 3Data structures and algorithms · Foundation
- Climbing a staircase, part 1 of 3Data structures and algorithms · Foundation
- Finding the unpaired ids, part 1 of 3Data structures and algorithms · Foundation
- A root-finding guarantee, part 2 of 3Data structures and algorithms · Applied
- What does the recurrence T(n) = 2T(n/2)+O(n) solve to?Data structures and algorithms · Applied · Free solution
- A hot-path buffer is a dynamic array with O(1) amortised push.Data structures and algorithms · Applied
- Using an unlimited supply of coins worth 1, 3 and 4, in how many ways can you…Data structures and algorithms · Applied
- 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