Ad
  • Custom User Avatar

    The first number in arr was never unique! So please consider this possibility (for my sake)! - ((

    We can't, as I said, there is (and there was, I didn't add it) a fixed test where the unique is the first one, so... You said your code passed 15 of 16 tests, your code failed that one, it's very simple. It's an edge test case to filter wrong solutions like yours. Fix your code so it can find the unique number even if it is the first one.

    About statistics:

    89% of 4,775 (4,775 / 13,625 - could have given a rating in total). <- This means that from 4,775 persons who cared about voting (in all languages), 89% voted satisfied.
    13,625 of 39,367 (less than 50% completed the task) <- No, this means that from a total completions in all languages of 39,367, 13,625 are from javascript. This isn't exactly true because a single warrior can complete the kata in more than one language and it doesn't count as +1 to total completions but it does count in language completion.
    Total Times Completed 39372 / Warriors Trained 68536 is roughly 57%.

    I believe that most of those who did NOT put a rating were dissatisfied with the task!

    Unproven

    P.S.: I see you've passed the kata but your code is still wrong, and it'll fail with inputs like this [2,1,1,1,1]. Check in Solutions how it is properly solved.

  • Custom User Avatar

    ... :/

    btw:

    DIDN'T COME TO YOU THAT THE FUNCTION HAS BEEN BROKEN RECENTLY?

    • That's called yelling (the caps). Bad idea.
    • and didn't that occur to you that you're currently trying to bend the reality so that your code is correct while maybe it just... isn't...? ;o
  • Custom User Avatar

    Perhaps there is another solution to this situation! DIDN'T COME TO YOU THAT THE FUNCTION HAS BEEN BROKEN RECENTLY? After the moment you went through it a month or a year ago or something? Have you tested this function today?

    Yes I did, and it works. When I see someone reports an issue, the first thing I do is testing the code to see if there is indeed an issue or not. I added a little code to make sure in random tests the numbers were different, but the chance that'd happen was near to 0 to begin with. And the code you posted was failing for another reason, as I already pointed out.

    They ALWAYS start with a NOT unique number

    There is a specific test where the unique number is the first one, why did you assume otherwise?

  • Custom User Avatar

    I hope this is not my interpretation error

    well, looks like it is... ;) You made the assumption that the unique number would never be at first position, but that's not part of the specifications.

  • Custom User Avatar

    Dmitrys2, with that code you wrote, you'll fail tests with inputs like this: [1, 0, 0, 0]. The kata is ok.

    I repeat, why is the number of completions so low?

    There are more than 13k solutions in javascript.

    And the number of unsatisfied people is so high!?

    It has a 89% satisfaction rating, does that seem low to you?

  • Custom User Avatar

    Hi,

    not an issue, a question. Long story short: read what's in there to find out what you did wrong. ;) (and apparently, you didn't get what the actual task really is... Not sure, since I don't really get your explainations. But What I'm sure about: the kata isn't broken, hence "not an issue, a question")

    cheers

    EDIT: make sure it doesn't happen because you're mutating the input (you didn't tell about the language you use so I cannot check)

    EDIT²: if ever this is the mutation of the input problem, raise another issue specifically about that (language+problem), thx