6 kyu
Roof Replacement
176 of 374PG1
Loading description...
Fundamentals
Strings
Arrays
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.
Groovy: random tests seem to generate a bunch of '/' for
s
and same amount of spaces forx
(no other characters), and the expected result for all of them is false. This seems incorrect according to description, as every hole is matched with a tile (although I'm not 100% what was intended, it was different in JS version at least).Ruby 3.0 should be enabled.
done
Haskell : https://www.codewars.com/kumite/5bbf76399b926d95960001f2?sel=5bbf76399b926d95960001f2
Approved
Python: the two arguments names do not match the description (f and r instead of s and x)
changed
It's not specified if the two strings can have different lengths. The random tests in Ruby generate strings of different lengths, but there're no such fixed tests.
Groovy translation kumited. Please review and approve. Thanks, suic
P.S.: There's a Python translation from GiacomoSorbi waiting for approval.
Approved, thanks for the reminder
The random tests in Groovy appear to be mixing up the two arguments - they pass a series of '/' as a top and a series of spaces as a roof. Basic tests and example tests are all passing for my solution.
Hi, can you give an example of an incorrect testcase and eventually paste here your solution and mark it as spoiler? Thanks, suic
Hmmm...why is nobody asking the obvious question here:
If a "new" roof only fits when there are holes to match the sticking up tiles then what's the point ?!
The rain still gets in.
Perhaps it is not the roof, but rather the sports centre committee, that needs replacing.
:D
Those
\
tiles are unescaped in the example test strings so they just don't exist at all at runtime. . (JavaScript)Fixed
Doesn't appear to be resolved... just tried.
I agree. Still broke.
Ruby version - passed all tests but one random one. Received following error message:
Testing for ' jn' and '/__' #<NoMethodError: undefined method
[]' for nil:NilClass>
block in roof_fix'each_char'
with_index'roof_fix'
block (3 levels) inblock (2 levels) in <main>'
times'Assume this is the test and not my code as passed all other 50 tests? Thanks.
May have been a CodeWars temporary bug as that test is now passing...
I could not reproduce the error, glad it now passes for you :)
Ruby and Python translations done.