Understanding Diff Algorithms & Longest Common Subsequence (LCS)
// Git-Style Unified Diff Output:
@@ -1,3 +1,3 @@
function calculateTotal(price, tax) {
- return price + tax;
+ return price * (1 + tax);
}- Split View: Aligns original and modified documents side-by-side in parallel columns
- Unified View: Stacks insertions and deletions sequentially in a single column
- Character Highlights: Shades exact word and letter changes inside modified lines
- Calculates additions (green), deletions (red), and unchanged line context