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.
Random tests very oftenly generates junctions with a route to itself, which should not be valid.
If the price is $0.18 per km, why are we multiplying by 18?
In fact the unit of the cost to be returned has never been specified. Is it in dollars, or cents?
@Electrick132:
Still happening:
You still don't look at this the "right" way (to understand my meaning). So far, again:
That situation isn't symetrical. If you ask me "why couldn't I do this with the tolls", I'd just ask to you "then why do you provide both directions right away with the roads?"
There is no satisfying answer to any of these questions. You perfectly CAN do it with those 2 different ways. That doesn't mean it's a logical way.
Kacarott's suggestion makes it logically more consistent, but I'd still prefer to have something actually "symmetrical" between roads and tolls implementations.
Concrete example in case that can clarify the situation a bit more: what you're doing here looks to me like some task where we'd have to work with two lists of numbers but with one of the inputs being a list of numbers while the other would be a list of numbers as strings. Not "symmetrical". Not logical.
Those two look like a contradiction to me... ;)
Forbidding modules is useful only if there is an actual point. For now, your kata can be solved with very suboptimal solutions (talking about performances), so there is no point to forbid anything.
Other than that, forbidding that module is just asking to the user for 2 tiny/tedious functions to do the very same. Not hard. But rather boring. It'd be way more fun to have access to the module and just get on with the fun part: solving the problem (as opposed to "implementing-boring-stuff-you-know-exists-already-somewhere-but-you-cannot-currently-access")
About "toxicity and co.": maybe you should somewhat reconsider the way you see a kata and CW. CW is not a place where anyone can drop any kind of kata at any time. It was at some point in the past, yes, but it's not anymore. That ofc creates some frictions between users here and there. 'Cannot be totally avoided. Sorry if that's spoiling the fun on your side.
Cheers
PS: an overview of the task at the beginning of the description
is still neededwould still be a good way to improve your kata.Thanks for the suggestion. I will look into changing this.
Edit: I changed the format from
X>Y
toX-Y
Because, as Mercy said in an earlier comment, the format
X>Y
clearly implies a single direction, fromX
going toY
. However in this kata you actually mean both directions. I think Blind4Basics was suggesting you therefore add extra tolls likeY>X
to make it explicit, but I also think that just changing the format slightly might be enough to convey that it is both directions. PerhapsX<->Y
or something.0>1
and1>0
in the tolls when one suffices easily enough?Codewars is intended to be a site full of fun challenges. It is not meant to be an impossible struggle to even get anything posted. I haven't been here long, but I can tell the site is full of toxic people. Please don't be one of them. I still won't unpublish.
Cheers
not a dup
: there is no need to find an exact duplicate. When you encounter that kind of problems, solving the task is way harder than formatting the data. The task has already been done a lot on CW. The uniqueness of your kata relies on the inputs formatting, which isn't the actual task here.It makes sense if you read it
: You didn't get what I meant. The inputs are correctly explained in the description, but their choice isn't sensical. in the roads, which are undirected, both ways are defined (0>1 and 1>0), while in the tolls, which are undirected too, you only provide 0>1 and the user has to define the other direction himself. Again, that's correct, but that's a non sensical choice of representation of the data. It's heterogeneous. (moreover, it's lost in the description, where the user is given a wall of text to read before even knowing what the actual task is => an overview of that task should be given right at the beginning, so that he understands right away what you're talking about and why you're talking about that)This is wrong
: And why don't you check your own code first?toll to go from 0 to 4, but 0 isn't linked to 4.
modules
: if you're talking about numpy or scipy, I'd agree. If you're talking about THE module for that specific kind of task, I'd profoundly disagree...Oh ok, sorry. I'll keep an eye out for this.
I will not unpublish this kata.
Hi,
Imo, you should unpublish this kata. Even if you enforce the time complexity, it's still a duplicate of other already approved kata.
Cheers
But as requested, I have solved again without imports :)
? My "criticism" was just showing how the original reference solution was wrong, which you fixed. I also commented a warning (to your friend, as it turned out) to not copy solutions, but that was no criticism of the kata.
I don't remember any original comment about imports in the description. I suspect you added that after you saw other solutions. Merely requesting people to not use imports is also not a good idea, by the way. Even if people comply during beta phase, once approved, many people will simply ignore it, to get easy points.
If you want the kata to be properly ranked at a level where users must implement their own data structures, then you need to actually ban the imports. However doing so is actually a lot more difficult than you might think.
Mmmh, it was supposed to contain it.
I guess I fucked up the copy/paste, my bad.
I have no problem with you posting critisism in the discorse, but if you are going to, please complete the kata without imports as requested in the details.
Loading more items...