Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 43s
apl-permutations was doing (append acc <new-perms>) which is O(|acc|) and acc grows ~N! big — total cost O(N!²). Swapped to (append <new-perms> acc) — append is O(|first|) so cost is O((n+1)·N!_prev) per layer, total O(N!). q(7) went from 32s to 12s; q(8)=92 now finishes well within the 300s timeout, so the queens(8) test is restored. 497/497. Phase 8 complete.
6.5 KiB
6.5 KiB