Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Your solution is the real "Best Practices"for this exercise. It is clear to understand what you done only reading your code.
I don't think there's really a need for that last group because the Regex will leave the punctuation marks untouched anyway, and it's greedy by default, so it won't stop short of the end of a word.
It would probably be a good idea to cut some of the Sodoku rules out of the description (such as what given numbers are), since they have no bearing on the puzzle itself, and are kind of distracting.
done
It's probably because you tried to output a character that is not visual. For example, the code 127, which refers to DEL.
This comment is hidden because it contains spoiler information about the solution
It's definitely a little more inefficient, but I don't think that the inefficiency is a huge deal here. However, that is something to keep in mind.
C++
what language?
Issue
label should be used when the kata has a problem, when the problem is in your code, useQuestion
instead.This comment is hidden because it contains spoiler information about the solution
Why is this an issue? Can't you print the input?
Hi @obnounce,
could you share with me the test case which the right outlier is -44?
NOTE: This is directed towards the author of this kata, @obnounce.
The test output is messed up in some cases. The reason for this can be traced back to line 9, where the if statement is. This statement queries if the VALUE of the last element in the list is the same as the VALUE of the element that it is on. This can produce some weird output (especially since the cone variable is never reset). Here are some sample weird outputs.
test_for({1, 0, 0}, 1)
Testing for {1, 00}
test_for({3,7,-99,81,90211,0,7}, 0)
Testing for {3, 7-99819021107}
The way to fix this is to change the if statement so that line 9 looks like
if (i == arr.end() - 1) cone = "";
This way, the if statement is comparing ITERATORS, not VALUES.