Jane Street Puzzle: Hooks 10

I recently tried to solve my first Jane Street Puzzle.

You can see my solution here: https://github.com/KFoxder/jane_street_puzzle

I am curious to see how others solved, most certainly more efficiently than I did. I found it to be the right mix of challenging and fun.

I improved my original solution from 20 minutes down to 20 seconds thanks to Avery Levin’s advice on narrowing the search space.