this post was submitted on 06 Nov 2023
1 points (66.7% liked)

Advent of Code

293 readers
1 users here now

Advent of Code is an annual Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

https://adventofcode.com

founded 2 years ago
MODERATORS
1
submitted 1 year ago* (last edited 1 year ago) by mykl to c/adventofcode
 

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.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here