InterviewDB Question

String Diff: Compute and Display Line-Level Diffs Between Two Text Files

Question Details

Problem Implement a line-level diff tool similar to Unix diff. Given two lists of strings (lines of text), compute the minimal edit script (insertions and deletions) to transform one into the other. Output in unified diff format. Example Follow-ups What algorithm computes the minimum edit distance efficiently? What is its time and space complexity? How does the Myers diff algorithm improve on naive LCS-based approaches? How would you extend this to word-level or character-level diffs within chan…

Full Details

🔒

Unlock all Jane Street questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a jane street interview during the phone round.

It covers the following topics: Strings, Dynamic Programming, Phone, Coding, Onsite .