Ad
  • Default User Avatar

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

  • Default User Avatar

    lol.

    What a kata....

    Make the createElement => use React.createElement

  • Default User Avatar

    Java.
    If the issue have aready been reported, maybe you can think about fix it ?
    It's a 8e kyu, not a 2e kyu. No need to put this kind of test, if the other are fine ...

  • Custom User Avatar

    There are already several issues posted below about this.
    Which language?

  • Custom User Avatar

    Several mixed topics, in there.

    • issue/not issue: the label, on CW, is reserved to problem in the kata itself (wrong tests, wrong code, wrong description, ...). In your case, the correct label would actually be "question".
    • Node.js sort the strings accordingly to the very specifications of this or that node.js version. Here, you're stuck with the available versions, so you have to deal with the specifications of those sort functions. And in those, [].sort isn't "stable". You can consider it a problem in JS (I'd actually agree about that x) ), but it's still not a kata issue.
    • on your side, you have to deal with that problem. You cannot rely on an unexisting feature to actually solve the task in a specific context (hence sort isn't stable), so you have to find another way to solve it. Hint: do one single pass on the string or pick an external library.

    It works in chrome. Probably on latest node as well.

    that's possible, but not the current context, so... ;o

    note: read this?

  • Custom User Avatar

    State the language, when you raise issues. Here it seems to be java.

    About your problem, not an issue, you just didn't understand correctly the task:

    longest consecutive repetition

    closing, cheers.

  • Custom User Avatar

    This has nothing to do with alphabetical order.

    Nodejs tests sorts the string wrong. On a reply below you can confirmed that yourself.
    What do you mean that it is not an issue and code is not following specs?
    It works in chrome. Probably on latest node as well.

  • Custom User Avatar

    careful with JS sort method. It's not "stable", when it comes to handling several items with the same "kay" value.

    Hence, not an issue (issue==wrong kata), but a problem in your code. You have to deal with the JS version available here.

    cheers

  • Custom User Avatar

    not an issue. Your code isn't following the specifications:

    If there are two or more characters with the same l return the first in order of appearance

    This has nothing to do with alphabetical order.

  • Custom User Avatar

    Im getting correct anwsers from all other plateforms like repl.it or in the chrome console.
    -- for input '5vs43awq1cypzd32xqkfzi4874ygr3asraqitgkdxjhfg505g4eb4e4vvb0hebn1jtqajjta36epd5bof7tm3iegtvsca7ilia6y7u6d48xk1etzgtned1dtiwlopz1d42jso873cfmb42awnb2dkjnr7l72ze03v7lpptg1ucoweivmaq979xht7sx0q62uv9c3yzpta142hyo4gjf4yv770zuc0frqx188ouiio1o2xjnp12otkrstnwr10vc30vesbfk3pm4uq9z9la51n04sm0o1uomb0czbfvn0hkplfdxnrerxu6s2sjfylambxchwz36mf1kawz5krknl2b2tk2ax3h9ydkfyfiimpoulkitczh8c7x4k9ba473wf9uuzcjkfmrfiek75zbqb9d065w29ovrh7v6p0zobzzvggp7auiywt4o1b5ri55ph64xywfhxqq1c3olptu07dlncd7x30fqdw5ubpcgywiy0l6yyg9n1'

    • Expected: ['v', 2], instead got: ['i', 2]
  • Default User Avatar

    assertArrayEquals(new Object[]{"a", 4}, Solution.longestRepetition("bbbaaabaaaa"));

    If i change the value of "4", i can pass the test. But not the validation, like you did the same mistake, and i cant change it ...

    My debug value say "bbbaaabaaaa letter: a len: 7"

    and validation : "arrays first differed at element [1]; expected:<4> but was:<7>""

  • Default User Avatar

    I had the same issue when rounding values in Java:/

  • Default User Avatar

    expected:<-11.66666666666666[6] is freezing tempera...> but was:<-11.66666666666666[8] is freezing tempera...>
    LoL

  • Default User Avatar

    You have all info in your comment, and if you experiment on the regex101, you will see how group work too
    i just succeed the kata thanks to what you said.
    i guess you probably need to mark it as spoiler for futur people reading it.

  • Default User Avatar

    you can search the website regex101 if you want to know more about regex and try it. Dont forget to select ECMAjs on the left.

  • Loading more items...