summaryrefslogtreecommitdiff
path: root/7.c
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2023-01-17 14:58:52 +0000
committerAdam Spragg <adam@spra.gg>2023-01-17 16:32:24 +0000
commit69a900c9b0e720c791f3d3deb28fc8de17f8cc8c (patch)
tree5ca44a8fc5412580deee9285cd4553bf9b39645b /7.c
parent966745e79b871c576b5ebdabea526b7acd3a4251 (diff)
Puzzle 16: Speed up the permute skipping code
By realising that the first time we hit the need to skip, the items to be skipped will be in sorted order; to change them to reverse-sorted order just requires reversing the items, not re-sorting them backwards. (On part 1 of the puzzle with a 40 minute limit, the timing goes from 6.6s to 4.3s, average of 5 runs.)
Diffstat (limited to '7.c')
0 files changed, 0 insertions, 0 deletions