Ad
  • Custom User Avatar
  • Custom User Avatar

    Thank you!
    Took a while to come to an approach like that.

  • Custom User Avatar

    Hi, Quark Fox!

    Have a look at the example (0, 30, 0, 30) once again:

    1. rotating the dial clockwise (instruction step#2) from zero to 30 will take 90 degrees;
    2. rotating the dial counter-clockwise (instruction step#4) from 30 to zero will take another 90 degrees;
    3. then again, rotating the dial clockwise (instruction step#5) from zero to 30 will take 90 degrees;

    According to the instruction steps(#1, #3) you have a value of 360 times 2(#1) + 360(#3), which is 1080.
    Now add this to 90*3 and you get 1350.

    Hope that helps.

  • Custom User Avatar
  • Custom User Avatar

    No, they actually don't move.
    You can read the above line as It is the letter, that takes some amount (value) and moves it (i.e. adds or subtracts it) at a certain position.
    So, the letters do stay put.

  • Custom User Avatar

    Yep, BigInt is fine, thank you.

  • Custom User Avatar

    Should BigInt be used in js solutions?

    While having everything correct up to 57, mine fails at all the next bigger values.

  • Custom User Avatar

    Feels like the description lacks the line from wiki here:

    Cards can be played onto a single shared stack, and players call "snap!" if two consecutive cards on this pile are identical.

  • Custom User Avatar

    Hi, Anton!

    Are you sure there is definitely a case with empty input?

    Well, I guess there's none of them - all the inputs do contain certain values.

    A possible cause to your illustration may be input mutating (i.e. you don't make a copy of an input array, but change that in place).

  • Custom User Avatar

    If you're stuck here, consider resolving this one first.

    https://www.codewars.com/kata/52a224d9e6d7a078200007b2

    Despite the common unlikeness, the entry point is pretty much the same.

  • Custom User Avatar

    In js, (Node v10.x), all you need to successfully pass the kata, it is to implement 5 empty descendant classes, e.g. class CustomShape extends Shape {} while leaving the main Shape class intact.

  • Custom User Avatar

    Agree with @St3f4n, looks like there's still some union check coverage missing.
    You may have some working solution for the intersection method, while all you got for union is TimeInterval.prototype.union = interval => null - and it successfully turns blue attempt to the green submit button.
    That doesn't work for the test button though.

  • Custom User Avatar

    This one looked a way easier to me than the former 5 command..., despite the higher rank.

    Thanks to @donaldsebleung for update on the loop command behavior - that was the only tricky thing here.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Couldn't wrap my head around the last one in Sample Tests section: a vs gx .

    We got 4% for the common space character at the end. Where do the rest 5% come from?

    • Same number of letters? No.
    • Same number of digits? Oh no!
    • Same number of words? Well, probably - in case there were more than one word (separated by spaces) in each string. As from the desciption, this one won't add anything either. Or should we treat spaces themselves as words as well?

    I'm asking, because this was the only thing I had to hardcode to pass the kata. Even the 500 Random Tests were ok without that.

  • Loading more items...