Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAI went back and reconciled my results vs the solution. The deltas were in the assumption that:
1) camera pans in the direction that would travel the least amount of degrees - the solution had 5 rows that had the camera traveling over 180 degrees
2) camera would have to go back to 0 degrees if a there is a duplicate card in succession - the solution had 3 rows were the camera did nothing vs. going back to 0 and then back to the same card
3) kept the first period, but deleted the last period
Other than that, I matched the solution. It was a really fun problem to solve.
:-) pretty much the same solution as @Max06270, and also wasn't able to match the time exactly.
However - have some ideas to "science the !#$@ out of this" as our Astronaut mentioned in the film, and hoping to post this today or tomorrow morning.
Please hold.... ;-)
:-) right - this is the WAY cooler version - 60% shorter communication time (11 mins)
Assumptions
Solution design
This solution is not perfect though - I couldn't figure out how to split out negative numbers with a tokenize regex.
desire is to split the following text into 2 words:
input: "42 -10 14 fido" should transfer into 4 words being 42; -10; 15; fido.
However - using the regex to detect word breaks (tokenize using \<\w+\>) discards the negative sign. @MarqueeCrew, would you mind suggesting a better regex to tokenise this and still retain the - character on numbers?
why not try:
"[^a-zA-Z0-9-]"
it might be
"[^a-zA-Z0-9\-]"
What a fantastic challenge.
First, my assumptions are as follows:
1. The message is to be recreated exactly quoted, included cases and all punctuation in the quotes;
2. The camera must pause for one second on all cards, including an additional second pause on a sequentially repeated character (and not using @alex 's masochistic return to 0!) and counting one second for the final card;
3. The camera moves in the direction constituting the shortest distance.
This is a little complex to break down, so it's easier to just have a look at the solution attached.
I get the same results as the posted solution up to a certain point, and that is the calculation of the camera degree. I've checked mine, and it starts to vary at row 59. I've checked my results manually and I get the same answer, so I don't know who has the correct calculation here, feel free to point out my mistake, however I see when there is a move from one character to another and back, I would assume those two movements would be the same distance which they are in my results but differ in the posted method. Again, I'm probably wrong, so please let me know!
My solution. Loved this one! Partially because I would definitely save Matt Damon...
Assumptions:
Assumptions
I was 11 seconds quicker than the provided answer, so win win for Mark Watney
Solution
This has to be one of my favourite challenges to date...more like this please @JoeM