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.
Remark below is an ISSUE.
Tests are susceptible to input mutation: if I change the input arrays, the changes are reflected in logs and messages.
Random tests are not strong enough. An inferior algorithm, hardcoding 2 fixed tests, made me pass all random tests.
To be fair, I did write the Road class, so of course I know how it works. I imagine that figuring out what it does and how you can use it raises this kata to a 6kyu. I think that it is a fair rating :)
Here's a Lua translation.
Nice kata!
Here is a Java translation.
Nice kata!
Thanks. As it would have it, I learned lua scripting before I studied Java in high school. (I made Roblox games for fun as a kid)
bro you can be good script writer
ok, sounds fair
I misread what you meant by "2 spaces". I thought you meant before the brackets :P
I have 0 experience in Python (my high school teaches Python, but since I'm competing for their computer science team I study strictly Java of which is the language used in the competition) so I'm just going to trust your translation and probably have my classmates and teacher run tests on it. I'll let you know if we find anything.
I looked at the diff and I think it looks good.
Thank you for the translation!
well, anyway, I submitted my translation
I don't think it is needed to get the kata out of beta (which is the main reason to translate to js/py at this point) - so it may make better sense to leave it for later.
additionally, it could be considered overengineered. that would be a valid reason to refuse it.
or if you meant to write it yourself
but uh I wrote it so I submitted it /shrug
I don't like having code in preloaded. and it doesn't really need to be there, it's kind of just convenient for the sample tests to share.
it does touch the description, so the diff would be something to look at.
oh and.. now it's TWO spaces?
I appreciate your feedback.
I include and mention private L and private R to let the solver know that they exist, but that to actually do anything with them they would have to use the public methods provided. It also helps them to understand that the next roads are indeed Road objects and that a Road could be thought of as a sort of Node. I feel that if I had not mentioned them, the kata would be needlessly more confusing, especially to 7kyu programmers (the target demographic of this kata). If I am to make a kata about using limited resources, I must of course give the solver adequate information about those resources.
Though, I am not sure what you mean when you say that they are "not conceptually the same type."
About the getters, ... I simply forgot how inheritance worked. I thought I would need them to access information about a Road when calling from other Roads, but that does not seem to be the case. Thank you for enlightening me.
About that space issue, I will of course fix it.
Thanks big mike.
From solving and from reading the code while considering a python translation, I have some nitpicks.
It doesn't make sense to tell the solver about private L and private R, the solver only ever uses one instance.
Likewise, it doesn't make sense to have them either, they're not conceptually the same type.
You also have getters that do absolutely nothing and half the time you don't use them. Just remove them?
There's no space before { in the initial code. Why do you hurt me? Also it should probably be two spaces for indentation for the initial code, because someone writing directly in the cw editor will have to fix it or ignore misalignment or fight the editor.
I finally finished this forsaken Michael Kata, it actually isn't too hard and I was severely overthinking. Patiently awaiting more Michael Kata, Little Mike!
Loading more items...