Ad
  • 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]