Post #2735417
2026-05-11 14:59 UTC
@jer_gib@functional.cafe Does this version really have complexity O(length ns + maximum ns)? The minimum of ns is the last element which takes linear time for linked lists. So I think this is (length ns) * maximum ns, but you could make it run in the desired time by using arrays instead of lists. Am I missing something? @byorgey@mathstodon.xyz @das_g@chaos.social
Replies (1)
-
@jer_gib@functional.cafe 2026-05-11 15:30
@oantolin@mathstodon.xyz @byorgey@mathstodon.xyz @das_g@chaos.social I didn't think about it very carefully... will have to ponder further.