Answer by Rick Davin for “Critter Tracking: When does it cross its own path?”...
My previous 2 answers may be thought of as extended comments with accompanying code snippets. I now offer a more comprehensive answer that addresses your specific code and the problem at...
View ArticleAnswer by Vynce for “Critter Tracking: When does it cross its own path?” Part 2
If (and only if) every move is guaranteed to be of non-negative and nonzero distance, you only need to track 6 moves, and you only need to compare a move against the move 3 moves ago or 5 moves ago....
View ArticleAnswer by Rick Davin for “Critter Tracking: When does it cross its own path?”...
UPDATE: this is 1 of 3 answers I have provided. It is more of a really big comment along with code. Look for my full, very long, more complete answer.I think your code is good enough as-is and its been...
View ArticleAnswer by Risky Martin for “Critter Tracking: When does it cross its own...
Your SequenceDoubler method posted at https://dotnetfiddle.net/8ByC2b could be improved. Here's the original version:private static IEnumerable<int> SequenceDoubler(int n1, int n2, double step =...
View ArticleAnswer by Rick Davin for “Critter Tracking: When does it cross its own path?”...
UPDATE: this is 1 of 3 answers I have provided. It is more of a really big comment along with code. Look for my full, very long, more complete answer.Since I am the one who came up with tracking of...
View Article“Critter Tracking: When does it cross its own path?” Part 2
Basic Info: This question is my second attempt at this question. It is based on a question similar to this Codility question. The input (an int array), the outpout (an integer) and the method signature...
View Article
More Pages to Explore .....