ocaml: phase 5.1 levenshtein.ml baseline (no-memo edit distance, sum=11)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 35s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 35s
Recursive Levenshtein edit distance with no memoization (the test
strings are short enough for the exponential-without-memo version to
fit in <2 minutes on contended hosts). Sums distances for five short
pairs:
('abc','abx') + ('ab','ba') + ('abc','axyc') + ('','abcd') + ('ab','')
= 1 + 2 + 2 + 4 + 2 = 11
Exercises:
* curried four-arg recursion
* s.[i] equality test (char comparison)
* min nested twice for the three-way recurrence
* mixed empty-string base cases
This commit is contained in:
@@ -407,6 +407,12 @@ _Newest first._
|
||||
binary search tree (`type 'a tree = Leaf | Node of 'a * 'a tree *
|
||||
'a tree`) with insert + in-order traversal. Tests parametric ADT,
|
||||
recursive match, List.append, List.fold_left.
|
||||
- 2026-05-09 Phase 5.1 — levenshtein.ml baseline (recursive edit
|
||||
distance, no memo). Sums distances for five short pairs:
|
||||
("abc","abx")=1 + ("ab","ba")=2 + ("abc","axyc")=2 +
|
||||
("","abcd")=4 + ("ab","")=2 = 11. Exercises curried four-arg
|
||||
recursion + s.[i] equality test + min nested twice + mixed empty
|
||||
string base cases.
|
||||
- 2026-05-09 Phase 5.1 — caesar.ml baseline (ROT13 with String.init +
|
||||
s.[i] + Char.code/chr). Side-quests:
|
||||
(1) top-level `let r = expr in body` is now treated as an expression
|
||||
|
||||
Reference in New Issue
Block a user