Expand description
§Amplification Circuit
Brute force solution for both parts using the utility permutations method to test each of
the possible 5! or 120 permutations of the phase settings.
Functions§
- parse
- part1
- part2
- permutations 🔒
- Generates all possible permutations of a mutable slice, passing them one at a time to a callback function. Uses Heap’s algorithm for efficiency, modifying the slice in place.