Cresta·Machine Learning Engineer·Technical Phone Screen
Jun 2026
Cresta ML Engineer interview that was basically one big coding/design question about sequence generation. They wanted both greedy and beam search implementations, recursive and iterative, plus complexity analysis. Pretty dense for a single session.
- You're given a token-to-next-token probability dictionary and a start token. Implement greedy decoding (both recursive and iterative) to generate a sequence, stopping at a terminal token or dead end.
- Using the same probability dictionary, implement beam search with beam size k using BFS-style expansion, tracking cumulative log-probabilities. Return the best completed sequence and optionally all completed beams. Analyze time and space complexity in terms of sequence length, branching factor, vocabulary size, and beam size.
“The recursive version felt natural to write but I second-guessed myself on the base cases.”