Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
No, you're wrong there, there is no Reverse Lexicographical 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.
2 comes before =. You can see that in the last example:
Confirming this is an issue.
https://www.codewars.com/kumite/65b82df297eea3ca1acfb34e
^ Fork fixing the issue
Thanks!
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.
if you mean a syntax error about
??
then that seems like a non-issue to meeither 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
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.
This comment is hidden because it contains spoiler information about the solution
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