Design decisions

56. monge_path returns two lists (2026-11-21)

std.dp.monge_path(n, w) returns (val: List<K>, prev: List<Int>), with prev[0] = 0, rather than a list of (val:, from: ?Int) pairs. Reason: an imported generic fn returning List<(val: K, ...)> instantiated its second field as _ under cpl run, and two flat lists are what the caller walks. It is the O(n log n) candidate deque; online LARSCH (O(n)) is the next step and keeps the signature. Reverse: return the pair list.