/maxcat

328 - PurelyFunctional.tv Newsletter - Puzzle - https://purelyfunctional.tv/?p=31144

Primary LanguageClojure

Largest concatenation of integers

If I have a list of integers, I can concatenate their base-10 strings to get one large integer. However, if I reorder them, then concatenate them, I could get a larger integer. The task here is to find the largest integer you can create by concatenating a given set of integers.

How to play

Edit the function maxcat.core/maxcat. Implement the function described above.

Run the tests with this command:

$CMD clj -m kaocha.runner

Or you can have them run automatically as you edit the file:

$CMD clj -m kaocha.runner --watch

How to submit

Please email your answers to eric@purelyfunctional.tv. I'll include them in the next newsletter.

Subscribe to the newsletter

https://purelyfunctional.tv/newsletter