5 Stage 5🔗

The answer to Stages 3 and 4 was 3865.

It’s worth asking why this game chooses a target of 24. Is it because it’s particularly easy? Or especially hard?

Another way to ask this is as follows. We know how many configurations have the value 24. How many configurations do other target numbers have? One or more of these targets produces the highest number of configurations. How many is that?Observe that we are turning this into an optimization problem. Quite likely, targets with the highest number of configurations are easiest, and those with fewest are hardest.

Problem: Implement a function

highest-count :: () -> Number

that when applied to no arguments computes that highest number of configurations.

This stage may take quite a while to run—that’s okay!