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.
Not best practice. This can be done with time O(n) and space O(n) using a dictionary.
This is very slow since it is using two for loops making it at worst O(n^2).
This comment is hidden because it contains spoiler information about the solution
As a starter, try to use Markdown when asking a question as it is very difficult to read what you posted in its current form.
What is the reason for using
\z
and not$
?Does it catch any edge cases?
Have a look at the problem description again. It says that you will be given an array of numbers that you are supposed to convert to a phone number in the format that the example show you.
Also, remember that you do not need to convert numbers to strings as this is done implicitly (if you are using c#, which it looks like you do).
This comment is hidden because it contains spoiler information about the solution
I experienced the same, and while the test case message is STILL(!) incorrect, the issue is not with the test case, but rather just an incorrect solution.
Interesting. My Console.WriteLine must be behaving strangely in the codewars IDE. Thanks for the help.
This comment is hidden because it contains spoiler information about the solution