Files
rose-ash/lib/ocaml/baseline
giles b240408a4c
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 22s
ocaml: phase 5.1 bs_rotated.ml baseline (rotated array search, encoded -66)
Binary search in a rotated sorted array. Standard sorted-half
test at each step:

  if arr.(lo) <= arr.(mid) then
    left half [lo, mid] is sorted -> check whether target is in it
  else
    right half [mid, hi] is sorted -> check whether target is in it

For [4; 5; 6; 7; 0; 1; 2]:
  search 0 -> index 4
  search 7 -> index 3
  search 3 -> -1 (absent)

Encoded fingerprint: 4 + 3*10 + (-1)*100 = -66.

First baseline returning a negative top-level value; the runner
uses literal grep -qF so leading minus parses fine.

196 baseline programs total.
2026-05-11 04:44:37 +00:00
..