giles
073ea44fdb
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s
ocaml: phase 5.1 palindrome.ml baseline (two-pointer check, 4/6 inputs match)
...
Two-pointer palindrome check:
let is_palindrome s =
let n = String.length s in
let rec check i j =
if i >= j then true
else if s.[i] <> s.[j] then false
else check (i + 1) (j - 1)
in
check 0 (n - 1)
Tests on six strings:
racecar = true
hello = false
abba = true
'' = true (vacuously, i >= j on entry)
'a' = true
'ab' = false
Sum = 4.
Uses s.[i] <> s.[j] (string-get + structural inequality), recursive
2-arg pointer advancement, and a multi-clause if/else if/else for
the three cases.
48 baseline programs total.
2026-05-09 10:31:22 +00:00
..
2026-05-09 08:50:12 +00:00
2026-05-08 19:57:09 +00:00
2026-05-09 06:15:03 +00:00
2026-05-09 06:59:22 +00:00
2026-05-08 21:05:32 +00:00
2026-05-09 09:15:00 +00:00
2026-05-09 02:24:45 +00:00
2026-05-08 17:52:49 +00:00
2026-05-09 00:13:11 +00:00
2026-05-08 16:53:44 +00:00
2026-05-08 13:44:28 +00:00
2026-05-09 10:21:11 +00:00
2026-05-09 01:47:27 +00:00
2026-05-08 13:44:28 +00:00
2026-05-09 10:31:22 +00:00
2026-05-08 15:01:04 +00:00
2026-05-08 13:33:24 +00:00
2026-05-08 17:44:07 +00:00
2026-05-09 06:05:31 +00:00
2026-05-09 01:11:53 +00:00
2026-05-09 09:34:40 +00:00
2026-05-09 08:21:19 +00:00
2026-05-09 07:41:01 +00:00
2026-05-09 10:07:12 +00:00
2026-05-08 19:49:08 +00:00
2026-05-09 00:23:58 +00:00
2026-05-08 13:33:24 +00:00
2026-05-08 19:10:49 +00:00
2026-05-09 05:00:50 +00:00
2026-05-08 13:33:24 +00:00
2026-05-08 18:43:19 +00:00
2026-05-09 08:29:01 +00:00
2026-05-08 13:33:24 +00:00
2026-05-09 10:31:22 +00:00
2026-05-09 09:57:18 +00:00
2026-05-09 07:19:52 +00:00
2026-05-08 20:49:26 +00:00
2026-05-09 09:24:41 +00:00
2026-05-08 19:04:04 +00:00
2026-05-08 13:44:28 +00:00
2026-05-08 23:40:36 +00:00
2026-05-09 08:39:56 +00:00
2026-05-09 09:47:25 +00:00
2026-05-09 00:13:11 +00:00
2026-05-09 06:47:47 +00:00
2026-05-09 07:31:33 +00:00
2026-05-09 02:16:18 +00:00
2026-05-08 13:33:24 +00:00
2026-05-09 05:44:35 +00:00
2026-05-09 08:11:07 +00:00
2026-05-08 16:11:03 +00:00
2026-05-09 08:01:21 +00:00