Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAMy solution.
Ended up about 20 secs lower than the output solution in the starting file, but am reasonably confident on the approach.
Assuming we dont include the last period in the message and we stop for 1 second at each arrival point to distinguish it as the letter of interest.
Note, if I was really trying to be as fast as possible I would probably title case the message and remove all white space. We save a significant amount of time doing that.
I assumed that the Camera would need to stop at each position 1 second which is why my results are about 2 minutes longer than the solution results. This was a fun challenge.
I should RTFQ, couldn't work out why my answer was so different until I saw that the message finishes on the last letter(which I took to mean full stop)
Hi! Here my solution :)
This was an extremely complicated one for me as I couldn't figure out how to get the shortest distance to return in the calculation (ex: going from position 1 to 16 is not 15 spaces, but 2). I ended up stopping where I was a few weeks ago and finally revisited the problem and boom the answer came to me. Always funny how that works sometimes.
Solution attached