Ad
  • Custom User Avatar

    I'm not quite sure how to to report this, but this kata is basically the same as https://www.codewars.com/kata/emirps

  • Custom User Avatar

    I passed, but I don't like my code. I can think of edge cases that it will get wrong that obviously weren't asked for.

    It's interesting that this (like many things) is more complicated than it seems at first, and I'm grateful for the thought it provoked,
    but for something I'm throwing a few minutes at, it's impossible not to cheat and see what sticks.

  • Custom User Avatar

    You made the same mistake I did on this one: it's not just that there's a triple in num1 and a double in num2, the double has to be of the same digit as the triple.

  • Custom User Avatar

    I just did this one and also had a random number of errors... until I reread the problem.

    It's not just that num1 has a triple and num2 has a double... it's that num2 has doubles of the same digit that's tripled in num1.

    eg: 123444, 122 doesn't pass. There's a double, but it's not double 4s.

  • Custom User Avatar

    Okay, so this one is fun and prompted me to dig into how regexps work in javascript. Thanks!

    For those of you getting a small but random number of errors, read the description more closely.

    I didn't read it carefully and I got a ton of false positives. The conditions are only met when there's a triple in number 1 and a double in number 2 OF THE SAME NUMBER AS THE TRIPLE. This last part is important.

    All of the sample cases have false positives. I'd suggest making at least one test case in the samples that has triples and doubles but not the same digit.