Files
rose-ash/plans
giles 8a80bd3923
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 26s
ocaml: phase 5.1 dp_word_break.ml baseline (4/5 strings segmentable)
Classic word-break DP — for each position i, check whether any
dictionary word ends at i with a prior reachable position:

  dp[i] = exists w in dict with wl <= i and
          dp[i - wl] && s.sub (i - wl) wl = w

Dictionary: apple, pen, pine, pineapple, cats, cat, and, sand, dog
Inputs:
  applepenapple        yes  (apple pen apple)
  pineapplepenapple    yes  (pineapple pen apple)
  catsanddog           yes  (cats and dog)
  catsandog            no   (no segmentation reaches the end)
  applesand            yes  (apple sand)

Tests bool-typed Array, String.sub primitive, nested List.iter
over the dict inside for-loop over end positions, closure capture
of the outer dp.

179 baseline programs total.
2026-05-11 01:53:21 +00:00
..