7 kyu
Redacted!
172 of 861dinglemouse
Loading description...
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.
JS: Node v12 should be used along with its appropiate assertion tools (Mocha + Chai). Refer to this and this
This comment has been hidden.
When you use a black pen to hide text then you will black out entire sentences including whitespaces. e.g. see the photo in the Kata description.
I don't understand why I get true in this test when in visual studio I get false.
doc1:
Line1 XXXXX doc2: Line1 Line2
Test Failed Expected: False But was: True
We agree that : doc1 = " \n\n\nLine1\nXXXXX" doc2 = " Line1\nLine2\n----------"
Thank you.
It means the input you test aren't exactly the same. Whitespaces are kinda tricky to copy.
This comment has been hidden.
Seeing that you don't get any reply in 7 months, probably means it's not the right place. You might have better chances if you ask in Codewars's Discord Server instead.
C++ tests generate warnings.
Fixed
that was very interesting. description is clear. test output is informative.
thanks for kata. likes++;
I think the wording of this could be improved. I initially took it to mean "new line characters will never be replaced by X" instead of "if a new line character has been replaced by X, you should return False"
When you redact a document, all you are doing is using a black pen to hide words. You are not (can't!) change the "structure" or "format" of the printed page, using a black pen. And
\n
is a structural element.Thanks For Explaining This
Hi
Passed most tests except this one...Can someone tell me why this fails? Ignored white spaces as before. Why this should fail?
doc1:
Line1 XXXXX doc2: Line1 Line2
Am I not getting something?
There are some newlines in the first doc.
Should i not ignore newlines when comparing? Rest of the test passed. Apart of newlines its the same.
I'd say no. I mean, you shouldn't ignore them.
The newlines must all still be same.
Imagine it as a paper document with some words blacked out. The lines don't change.
Thanks Chrono and Dinglemouse. Your help led me to the right regex. Thumbs up!
How can this can be SAME (TRUE). doc2 has regZ* ???
doc1: More (XXXXX) to muck up reg.{99} [solutions]+ doc2: More (stuff) to muck up regZ{99} [solutions]+
Maybe markup messed up in your comment?
The real tests look like this:
python translation:
https://www.codewars.com/kumite/5ea7f0a38df3f300115bae1d?sel=5ea7f0a38df3f300115bae1d
Approved. Thanks :-)
Thanks to you!
Got an issue for the JS version:
Incorrectly failing test :
Expected: false, instead got: true Log doc1: XXXXX. The final frontier
doc2: Space. The final frontier
expect: TRUE
You're confusing 2 tests, the log appears above the error message. Your code is failing the previous one.
doh! thanks
The C# translation is not working as on JavaScript.
OK. Please give details so it can be fixed
I just solved it in C# (simply converted my solution from C) and it worked just fine...
Edit: same with js
C# Translation added.Please review and approve~
Approved :-)
@dinglemouse, C/C++ & JS translations ready...whenever the site starts allowing approvals again.
OK. thanks. Currently not working...
(If I haven't done after a few days please remond me again)
C/C++ Approved.
The JS translation still has no "Approve" button (??)
And JS approved now too...
I'm confused as to why the professor Plum example is false.
XXXXX would certainly cover the word Plum, and one following whitespace, so why is it false?
This Kata is only accepting the redaction if there is an actual character to redact, but in the example there are no characters after the
m
in Plum.If it had been
Plum
(with a space) then answer would have been true, like you say.I haven't understood if whitespace should match or not.
For s1 and s2, should I return true or false? s1 = "Line1
XXXXX"
s2 = "Line1 Line2"
The whitespace test is the single one that's failing.
Description says:
The styles of the table on bottom of 'Details' tab is messed up: https://www.codewars.com/kata/redacted/java
Fixed