feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent 98ebb1600f
commit 16b02451d0
94 changed files with 1840 additions and 0 deletions

View File

@@ -9,6 +9,32 @@ categories:
patterns:
- dynamic-programming
function_signature: "def min_distance(word1: str, word2: str) -> int:"
test_cases:
visible:
- input: { word1: "horse", word2: "ros" }
expected: 3
- input: { word1: "intention", word2: "execution" }
expected: 5
- input: { word1: "abc", word2: "abc" }
expected: 0
hidden:
- input: { word1: "", word2: "" }
expected: 0
- input: { word1: "abc", word2: "" }
expected: 3
- input: { word1: "", word2: "xyz" }
expected: 3
- input: { word1: "a", word2: "b" }
expected: 1
- input: { word1: "kitten", word2: "sitting" }
expected: 3
- input: { word1: "saturday", word2: "sunday" }
expected: 3
- input: { word1: "algorithm", word2: "altruistic" }
expected: 6
description: |
Given two strings `word1` and `word2`, return *the minimum number of operations required to convert `word1` to `word2`*.