Delete Operation for Two Strings

In a data compression scenario, two strings document1 and document2 need to be synchronized by removing characters. The goal is to find the minimum number of removal operations required to make both documents identical. Each operation allows the removal of exactly one character from either document.

Examples
Input: ["sea","eat"]
Output: 2
Hints

Delete Operation for Two Strings

In a data compression scenario, two strings `document1` and `document2` need to be synchronized by removing characters. The goal is to find the minimum number of removal operations required to make both documents identical. Each operation allows the removal of exactly one character from either document.