As a warmup for this year’s Advent of Code, I’m re-reading and posting my solutions to last year’s challenges. You can read, run and edit today’s solution by following the post link.
Another simple challenge today, requiring us to look for (and avoid) repeating characters in a given run of characters. I suspect the authors hoped we would write clever code that noted the locations of any repeated characters and then skipped forward to avoid them, but the source text and key lengths were so small that none of that was necessary. Just mashing every successive run of test candidates into a Set to test for uniqueness ran all tests and the full solution in 65ms.
You must log in or register to comment.