FDEInterviews logoFDE/Interviews
Coding & DSA / 90
hardNewHarveyAnthropic

Tag every part of a generated sentence that came from a source, merging overlaps and listing the sources that contributed.

The signature coding problem at a legal-AI company, and it is interval merging wearing a product costume. The candidates who struggle are the ones who start matching before deciding what a match even is.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

The signature coding problem at a legal-AI company, and it is interval merging wearing a product costume. The candidates who struggle are the ones who start matching before deciding what a match even is.

Unlock the other 496 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

This is the coding half of a product every RAG deployment eventually needs, which is why it is asked: the interviewer wants to see whether you recognize interval merging under an unfamiliar description. Two clarifying questions are worth real points. Do overlapping occurrences of the SAME source count once or twice, since that decides the ordering of the attribution list. And do touching spans merge, since 'overlapping' is ambiguous at the boundary and choosing silently is how two correct-looking implementations disagree.

DISCUSSION · 0

No comments yet — be the first to share your approach.