Ad
  • Custom User Avatar

    I mistakenly approved a more recent fork first, where they edited the description. Now they wont let me approve yours. Can you please edit your description to match the new one so I can approve it?

  • Custom User Avatar

    I think you need to change this. This was tripping me up too. I honestly don't have much insight into how hypothetical truck drivers feel about their cargo, fuel tanks, or whatever this cylinder is. The wording needs to speficy that the problem is asking for the volume of liquid in the tank. I also interpreted "the remaining volume" to mean "the empty space."

  • Custom User Avatar

    It's what came to mind first :P

  • Custom User Avatar

    substr is different from substring. the first parameter computes the correct starting location of the substring by using Math.ceil, and the second parameter tells substr (not the same as substring) to get the next 1 or 2 characters depending on the parity of the length of the string.

  • Custom User Avatar

    Thanks! I'll get to the random test cases asap.

  • Custom User Avatar

    Thanks for observation, should be fixed now, please double check.

  • Custom User Avatar

    Thanks for observation, should be fixed now, please double check.

  • Custom User Avatar

    Yeah, I tried to throw curve balls by being inconsistent with casing and ended up getting mixed up myself. Thanks for observation.

  • Custom User Avatar

    Thanks for your help

  • Custom User Avatar

    Ahh there we go. I didn't notice that the problem solution and test cases were not in accordance with the problem statement. Should be fixed now; thanks a lot for your help.

  • Custom User Avatar

    Thanks for your input. I'm new to codewars and I've been getting some conflicting advice with regard to assertEquals vs expect. Fixed it to reflect your suggestions other than the grouping by decribe and it, since this is an 8 kyu kata.

    Could you please mark as resolved?

  • Custom User Avatar

    Thanks a lot! Sorry I couldn't fix my own errors, have had some bad personal situations come up.

  • Custom User Avatar

    Needs more examples and test cases. Also, instructions need to make it evident whether this array is only of primitive types and strings or whether it can hold other arrays, objects, etc.

  • Custom User Avatar

    Hey, could anyone tell me if there is any kind of performance measures here? Will it be acceptable if I parse/compute the solution in multiple passes? I can't figure out how to crack the dual unary/binary nature of the minus sign with a regular left-to-right reading solution with the operator and operand stack.

  • Custom User Avatar

    My JS code runs in under 0.15ms for the all test cases on my machine, yet it was timing out on codewars. I gave up on the problem thinking that I just wasn't seeing the algorithm correctly and that there must have been an O(n) solution I didn't know about, but this wasn't the case and I'm pretty bummed that I missed out on the honor =/

    I should have tested my local running time before giving up I guess. Great Kata though, I would rate the difficulty at 3 kyu.

  • Loading more items...