6 kyu
Complete The Pattern #12
203 of 787DivyanshBatham
Loading description...
ASCII Art
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
In JavaScript, if random tests generate n=0, the reference solution expects the output to be '0', which contradicts the rules in the description:
If n < 1 then it should return "" i.e. empty string.
Just a grammar correction:
upto
is not a word. The correct spelling isup to
.Sorry, but I've been doing all the Complete the Pattern katas, and that's been bothering me.
Good one, figuring out the number of spaces is the key here!
This comment has been hidden.
Pay attention to new lines, they are important too.
Also, not an issue.
Great kata, done this one now in Ruby and Python. I have starred all 15 of the Pattern kata that I have completed so far. Thanks !! :)
I recieve this error when running the suite:
-isystem /runner/frameworks/cpp fatal error: 'boost/algorithm/string/join.hpp' file not found #include <boost/algorithm/string/join.hpp> ^ 1 error generated.
I'm not sure if it's related to this exercise, but I must say it's very frustrating, having spent much time, only to find out I can't get credit for my time spent.
@CodeWars: Please investigate!
The issue is resolved now
Got the following error. I believe I did not use anything that is 'boost' (I'm not even familiar with that library as of yet). Please fix. Perhaps you could limit your preprocess to include only the string and algorithm. This is an epic fail for C++ version.
"-isystem /runner/frameworks/cpp fatal error: 'boost/algorithm/string/join.hpp' file not found #include <boost/algorithm/string/join.hpp> ^ 1 error generated."
This comment has been hidden.
Can't submit C++ solution, but tests run successful. I'm getting error: "fatal error: 'boost/algorithm/string/join.hpp' file not found" (I didn't use Boost in my solution). I think something wrong with Boost in all C++ Katas. You can't use it now, but I did use it a couple of days ago. So test which use Boost are broken.
C++-Translation kumited.
Please check it and approve. Thanks! ;)
Done
Hey :) How are you doing?
Please look at the above comments, marked as issues. It's something realted to Boost Library.
C#-Translation kumited!
https://www.codewars.com/kumite/579b5791582a1b7fb1000167
Please check and approve!
This comment has been hidden.
Try using
row = row.concat("\\n");
Instead ofrow = row.concat("\n");
. Then check your output with the text fixture code manually.On the side note always format your code using Markdown. An extract from Markdown link -
Thanks for the reply. I've since worked out the issue, it turned out one of my for loops was running too long or something.
Good to note about the markdown though! Thanks for mentioning that!
This comment has been hidden.
Try Escaping Newline Character.
like this? "\n"
not working. Now I get this result:
Expected: 1 1 2 2 3
2 2 1 1, instead got: 1 1\n 2 2 \n 3 \n 2 2 \n1 1\n Expected: 1 1 2 2 3 3
4 4
5
4 4
3 3
2 2 1 1, instead got: 1 1\n 2 2 \n 3 3 \n 4 4 \n 5 \n 4 4 \n 3 3 \n 2 2 \n1 1\n
Well now you can compare the expected string (see the test cases) & instead got (see output window), and you will find there is something extra in your output.
Spaces are being ignored in my strings. If I concat like this: 'foo ' + ' bar', the spaces won't show up. It works in my developer console.
They should not be doing so o_O , post your solution as a spoiler then maybe me or someone can help you out...
Edit- I don't know whether you were notified earlier, so for testing lets see whether this notifies you @ tikitariki OR #tikitariki
This comment has been hidden.
Fixed ^_^