Round 1 — Background / recruiting round
Self-introduction, plus walk through a project you've worked on recently. They dug deep into the project, but the follow-ups were all from a product angle rather than implementation details: was this decision made by your system or upstream? How do you define "it worked"? What's the success metric for this project?
What's your understanding of what Mercor does? Why do you want to join? (Every startup asks this round — you need to be specific.)
How do you use AI day to day? They pushed into a lot of detail: what it looks like for on-call automation, for code review, for design discussions, respectively, and which tools you use.
Do you have any side projects of your own? I talked about an advisor agent I built myself.
Round 2 — Technical phone screen (~50 min)
- Sorting theory (verbal, no coding)
Naive insertion sort is O(n²). How do you get something faster than n²? Explain how it works (quicksort — pick a pivot, split into two halves and recurse / mergesort — divide and conquer).
What's quicksort's worst case? (An already-sorted array where you always pick the largest or smallest element as the pivot → n².)
Now the other direction: how would you design a sort that's slower than n²? How many non-empty subsequences does an array have? (He defines subsequence clearly: pick any set of indices, keep the original order, doesn't need to be contiguous.) → 2ⁿ − 1. How many permutations are there? → n!. So a "sort" that enumerates every permutation until it finds the sorted one runs in n! — that's how you get something slower than n².
- Code review: a chunk of caching code with a concurrency bug (written in Python)
You're given a compute(x) function: check the cache → return on a hit → on a miss, do one expensive computation → store it in the cache → return.
"Suppose someone hands you this code in a code review — what do you say?"
They walked me through it layer by layer: first, the concurrency issue — if two threads both miss at the same time, the expensive computation gets done twice. Add a lock; then they asked how do you guarantee it only runs once (double-checked locking: after you get the lock, check the cache again). Which line the lock should go on, and what happens if you lock too broadly (every request, including cache hits, gets serialized).
Finally: what's the behavior of a Python dict under concurrent reads and writes in a multithreaded context — do you read the old value or the new one?
Discussion
Loading comments…