Ad
  • Custom User Avatar

    Random tests very oftenly generates junctions with a route to itself, which should not be valid.

  • Custom User Avatar

    The cost of fuel should be calculated using the provided price. The cost of fuel is per kilometer, not per litre or gallon. To calculate the fuel cost for a 12km stretch at $0.18 per km, you should multiply 12 by 18. This should be factored into your final route calculation.

    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?

  • Custom User Avatar

    @Electrick132:

    • you just copied the solution of your friend
    • you ranked this kata 8 kyu => got removed
    • you ranked this kata 7 kyu => got removed
    • you ranked this kata 2 kyu => now that's enough => removed, and your account will stay locked for some days, now. Once it's unlocked, I strongly suggest that you stop messing with the beta process.
  • Custom User Avatar

    It was a bug that I missed. It's fixed now.

    Still happening:

    0: {0: 20, 3: 69, 4: 46, 1: 65, 6: 24}
    1: {0: 65, 3: 28, 5: 49, 2: 58}
    2: {4: 10, 5: 17, 1: 58, 3: 42}
    3: {0: 69, 1: 28, 2: 42, 3: 71}
    4: {0: 46, 2: 10, 4: 63, 5: 10}
    5: {1: 49, 2: 17, 5: 59, 4: 10}
    6: {0: 24}
    
    ('3-6', 934)  <<<
    ('6-0', 765)
    ('5-0', 384)  <<<
    

    Why would I put both 0>1 and 1>0 in the tolls when one suffices easily enough?

    You still don't look at this the "right" way (to understand my meaning). So far, again:

    • roads are undirected. For every road A->B in the dict, the other way is provided as well in the input, B->A
    • tolls are undirected as well. But you provide(d) the info one way only.

    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.

    The idea of the kata is for it to be done without any modules. This means any modules. I don't really care how little or how much they do.

    Codewars is intended to be a site full of fun challenges

    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 needed would still be a good way to improve your kata.

  • Default User Avatar

    Thanks for the suggestion. I will look into changing this.
    Edit: I changed the format from X>Y to X-Y

  • Custom User Avatar

    Why would I put both 0>1 and 1>0 in the tolls when one suffices easily enough?

    Because, as Mercy said in an earlier comment, the format X>Y clearly implies a single direction, from X going to Y. However in this kata you actually mean both directions. I think Blind4Basics was suggesting you therefore add extra tolls like Y>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. Perhaps X<->Y or something.

  • Default User Avatar
    • This kata puts a unique point onto an already used idea. The entire toll road point stops it being a duplicate.
    • Why would I put both 0>1 and 1>0 in the tolls when one suffices easily enough?
    • Sorry about this one, I was wrong. It was a bug that I missed. It's fixed now.
    • The idea of the kata is for it to be done without any modules. This means any modules. I don't really care how little or how much they do.

    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

  • Custom User Avatar
    • 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?

      roads: [{2: 79, 0: 13, 1: 52} {0: 52, 3: 64} {0: 79, 2: 28, 3: 25, 4: 33} {1: 64, 2: 25, 4: 80} {2: 33, 3: 80}]
              ^^^^^^^^^^^^^^^^^^^^
      tolls   {'0>4': 151, '1>4': 1301}
               ^^^^
      

      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...

  • Default User Avatar

    Oh ok, sorry. I'll keep an eye out for this.

  • Default User Avatar
    • This is not an exact duplicate. As far as I know, there are not any other katas with the premise of the toll roads. If you are making this point, provide a link.
    • It makes sense if you read it. What do you mean by 'he tolls are supposed to be undirected but have to be made so on the user side.'
    • This is wrong. The random test cases cannot provide a toll for a road that does not exist. Again, proof needs to be required for a point of this to be made.
    • Any modules. People were making soloutions that outsourced the hard work to other modules. This was not the intention.
    • Very well, I will remove the suggestion.

    I will not unpublish this kata.

  • Custom User Avatar

    Hi,

    • This is unfortunately a duplicate (see cheapest route, or shallowest path in the river and so on).
    • the description is very convoluted... and the specs of the inputs aren't clear. Or even concistent: the roads are given as an actual undirected graph, while the tolls are supposed to be undirected but have to be made so on the user side.
    • the random tests may provide illogical data: a toll may be provided for a road that doesn't exist. Not specified, but mostly, that shouldn't happen.
    • what module are you actually talking about...?
    • the appropriate algo here is not Dijkstra (Dijkstra implies that you're searching for all best path from one source. Here the task is "simpler")

    Imo, you should unpublish this kata. Even if you enforce the time complexity, it's still a duplicate of other already approved kata.

    Cheers

  • Custom User Avatar

    But as requested, I have solved again without imports :)

  • Custom User Avatar

    ? 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.

  • Default User Avatar

    Mmmh, it was supposed to contain it.

    I guess I fucked up the copy/paste, my bad.

  • Default User Avatar

    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...