Beta
Build a Bridge
10kvbc
Loading description...
Algorithms
Puzzles
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.
New one... ;o
It's never explained what are the rules about the supports:
for instance, the current rules call for "non sensical" brigdes. Imo, you should ask for supports that actually support something, meaning, they should be extended until they either reach the blocks, or the beginning/end of the "matrix" (considere this as a suggestion only). And they should stop before overwritting a block character (this part is rather an issue... Well, let's say a "strong" suggestion...)
another point: your tests allow the user the mutate the input. Not a problem in the way we usual write this, because it doesn't affect the tests, but that's bad practice in general, for this kind of input. So I'd suggest that you go for one of those two options:
edit:
and you need real sample tests, as I said below, testing for meangful cases (like, all the edge cases I talked about above!)
The supports are always the same
The bridge will never be on the last or second to last row of the matrix, but it's not stated anywhere, my bad.
Yea, they're "non sensical" bridges. These appear only in random tests so I will probably add some more tests and make them "sensical".
Not sure what you mean by "the user can mutate the input". I'm new to codewars, could you explain some more, please ^_^
if you wanna make them "sensical" (the random tests), you'd have to add more constraints in your random generator.
look at my solution: I'm changing the content of the input matrix on the fly, rather than creating a fresh one. That means the input is modified in your tests after you executed my function. Again, that's not a problemwith the current setup of the tests, but that's not good practice. Hence my two suggestions above about that.
should be done
ok. But you realize you're adding new behaviors without changing the specifications in the description? You just added the "unbounded support" thing while:
you really should gather your thoughts about what are every requirements, then rewrite the full description from scratch.
And what about the other points?
btw: the sentence below feels wrong to me. I'm not sure but I believe you're talking about verticality, here, while you use
width
?It is talked in the specifications, in the last point. And it is said that it stops when it hits the edge or "sticks" to a solid block What other points? My bad, fixed
...You're still overwritting the block with the supports... :/
Okay, I changed the specifications. Now you are extending the support till it hits a solid block
... x/
seriously...? seems your random tests are flawed.
and I just saw there is a test with 3 pillars. That should be in the description...
I updated the random tests, what do you mean by pillars? The width of the matrix or rather the
*
?let's close this one... See above, tho.
hi,
the description is lacking a lot of things:
^
chars is a bad idea, since it will never be an actual input. The question marks are much more appropriate, here.And the sample tests are close to useless to the user, for now, because you only test for different materials and not different sizes.
*
? If so then it's said in the description that it should build a bridge between 2 highest and closest onesand i'm going to add more sample tests
yes, by "pillars", I meant
*
.That's better, but still not enough:
13>8
while it should be13>=8
If I interpret your sentence, I'd guess that I'm supposed to buil one single bridge when 3 blocks/pillars. Is that correct?
=> As you can see, it still needs some work. ;)
Yes, you're supposted to build a one single highest possible bridge. I'm on it.
What to do in this case:
well, it's not as long as it's actually stated that way. ;) (mostly because there are a lot of details you didn't give, so that's an opened door to hypothesis)
My bad. I forgot to mention, that there will always be only one possibility of building a bridge per row
No random tests(check my solution to see why that is needed)
You are right, i'm on it
Done, thanks for that
.