ocaml: phase 5.1 bfs.ml baseline (20/20 pass)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 20s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 20s
Graph BFS using Queue + Hashtbl visited-set + List.assoc_opt + List.iter. Returns 6 for a graph where A reaches B/C/D/E/F. Demonstrates 4 stdlib modules (Queue, Hashtbl, List) cooperating in a real algorithm.
This commit is contained in:
@@ -407,6 +407,10 @@ _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-08 Phase 5.1 — bfs.ml baseline (20/20 pass). Graph
|
||||
breadth-first search using Queue + Hashtbl visited-set + List.assoc_opt
|
||||
+ List.iter. Returns the count of reachable nodes (6 for the demo
|
||||
graph A→B→D→F, A→C→{D,E}, E→F).
|
||||
- 2026-05-08 Phase 1 — type annotations on let-bindings and parens
|
||||
expressions (+4 tests, 473 total). `let NAME [PARAMS] : T = expr`
|
||||
and `(expr : T)` parse and skip the type source. Runtime no-op
|
||||
|
||||
Reference in New Issue
Block a user