Ad
  • Custom User Avatar

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

  • Custom User Avatar

    No, you're wrong there, there is no Reverse Lexicographical Order:

    in decreasing order of their length and when they have the same length sorted in ascending lexicographic order

    You sort them by length, from longer to shorter, and when they have the same length, you use the default sorting for strings (ascending) in the language you use.

  • Custom User Avatar

    In the result, substrings (a substring is for example 2:nnnnn or 1:hhh; it contains the prefix)

    2 comes before =. You can see that in the last example:

    s1="Are the kids at home? aaaaa fffff"
    s2="Yes they are here! aaaaa fffff"
    mix(s1, s2) --> "=:aaaaaa/2:eeeee/=:fffff/1:tt/2:rr/=:hh"
    
  • Custom User Avatar

    Confirming this is an issue.

    https://www.codewars.com/kumite/65b82df297eea3ca1acfb34e

    ^ Fork fixing the issue

  • Custom User Avatar
  • Custom User Avatar

    It seems like an issue to me (just not a well described one). The only functional version at the moment is 18, but all others are selectable (and it seems to select v8 by default). The other versions should be disabled.

  • Default User Avatar

    if you mean a syntax error about ?? then that seems like a non-issue to me

    either way, you need to include more information for your issue to be actionable, for starters making sure that others know which particular error you're talking about and ensuring that others are able to reproduce it

  • Custom User Avatar

    The author hasn't been on Codewars for over 9 years, so I'm afraid you are left with just whoever cares enough about this kata enough 😅.

    I do actually agree that a simple non-mutation check would be a nice improvement, but there is actually work being done on a solution which would solve the mutation problem and all the others at the same time, so adding the mutation checks on this kata might not be necessary soon anyway.

  • Default User Avatar

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

  • Default User Avatar

    How exactly to go about that probably depends a lot on the language.

    I think the intention of the kata boils down to that the only way one should interact with a node is through next and identity comparison (is node A the same node as node B? yes/no)

    Some languages (like haskell) can enforce that.

    For python one would probably need to get a bit crazy and always return new objects on next so that they can't be tracked (remembered, specifically) in any way - but still have them comparable through ==. I then started looking at comparisons for js and started crying. why is this language still in use in the current year?

    the description doesn't bother to mention what the restrictions are, which I think is unfortunate. It would be good if they explicitly stated that you may do X and Y, instead of listing a few things that aren't allowed, which isn't all that helpful

    it doesn't help that some translations (python, anyway) makes no attempt whatsoever at discouraging solutions that mark/remember nodes