Send your feedback or ask for help here!
@davilla Can you explain the following? I dont see any test case named “criss-cross”.
“Some points labeled with punctuation will have a zero coordinate. In the tests, the hyphen in criss-cross is an example. A zero coordinate is not considered crossing the axis. Thus, do not add a space except when entering a new orthant from previous.”
For the below test case why the output is “Great!” and not “Grea!t”? Please explain.
a 4 7
e 5 6
G 5 2
r 4 4
t 3 10
! 0 9
Cause sqrt(20) > sqrt(10).
Distance is from the previous point (“a” here), not from the starting point.
And basically there’s an orthant change when at least one coordinate goes from < 0 to > 0 or vice versa.
There’s a test called Hyphenation, and criss-cross appears 2 tests below that.
Edit: After a reorder, it now appears in the next test after Hyphenation.
I liked your puzzle but I have some troubles with the validator test 12.
I have no idea why, is there something special in this test that I could have missed ?
EDIT : found the solution, it’s beacause in test 12 there is negatives coordonates then equal to 0. In IDE tests there is only the case with positives coordinates then equal to 0.
Thank you for coming back with an update. I will change the test cases to include this as well.
Hi @davilla, I am having some trouble with the validator 10 of your puzzle as it represent an edge case never seen in the tests.
And in general with the crossing rule. I think the test cases are missing some edge cases. So far I have successfully passed 100% of the test cases with 3 different interpretation of the crossing rule ( I knew they were not good, just wanted to test for edge cases). I don’t know if its possible to change the test cases now, but I suggest you to add a difficult test with multiple 0 coordinates crossings in series (the first one canceling the second, I don’t know if I’m clear)
The crossing rule is meant to be an add-on to make the puzzle a little more interesting. It had to be scaled back some because it had turned into a head-banger. As far as I’m concerned, if you’re passing all the tests, then you should be passing the validators, and I’d want to simplify #10 to ensure it. Would you be able to share your code with me directly, whichever version failed that? And I will be happy to share why it failed, if you are interested, and what would have had to change.
So… Turns out I made a dumb mistake that only appeared in validator 10 ( so I thought it was an edge case). I’m still a bit confused about this crossing line thingy but it might be just me. I have two version of my code that both have 100% now so this edge case I was referring to does not exist in the puzzle!
What confuses me is when you cross one line while standing on another line, its an in-between state where you could technically be in two orthants. But I think it’s just in my head.
There are definitely unusual scenarios which arise from edge cases not tested, and different valid interpretations for them. For instance, you could have a point with a zero coordinate which is clearly not adjacent to the previous orthant (due to sign change on a different coordinate), but whose new orthant would not be clearly defined. These scenarios are avoided, and the description kind of high-level, so as not to get bogged down in the detail of it, and keep the focus of the problem on nearest distance.
@davilla I’m having troubles with the case #10. I think it’s because of me not understanding everything properly - even if I’m trying to solve it on paper I get the same result as my program (criss-cross,asuce apple instead of criss-cross, apple sauce).
EDIT: I figured it out
That was relaxing. Nice to have a Puzzle of the Week that isn’t hard/very hard.