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.
Additionally:
Node
class is buggy because it ovrridesEquals
but notGetHashCode
.C# test suite generates a warning, and the preloaded
Node
class is missingGetHashCode
.Gripes with the description that I feel should be addressed:
The PHP random test cases are broken.
I know they're broken because I SOLVED IT!
drop-in hotfix included in this post! (down near the end)
Sorry if this is a litte long-winded, pretty new to this.
There are 2 core issues here:
A Fatal error within the random test-cases.
This was mentioned 2 years ago by another user.
I originally thought this was a memory leak due to some pile-up of
Node()
objects somewhere, but after more investigation this doesn't appear to be the case.This appears to correlate more heavily with the next issue. (though, it's hard to say exactly how?)
This can be avoided by creating new nodes rather than linking nodes. (
$node->next = new Node($other->data);
)Mangled inputs making the random tests effectively impossible.
This was mentioned 5 years ago by another user (the issue mentioning 'DEAD LOOPS' (I'm unfamiliar with the term, but I think they're correct?)).
The random test cases are re-using the previous solution for the next tests input.
These random tests appear to take the form of "append a to b, then append b to a" (in pairs), with the issue being that list_b for the alternate case will contain the previous solution instead of the swapped input.
This is possibly due to literally having swapped the input variables (after users have mutated them), instead of fully re-constructing them for the alternate test-case.
This can be worked around by using global variables to cache the previous inputs and outputs, to determine if one's been mangled, and restore the correct input.
Here are the functions, setup and teardown that made this kata possible for me. (I'm hoping this won't get spoilered, because I really have tried to keep it spoiler free).
There's almost certainly other ways to tackle this once you know how the bugs work, but this should (hopefully) be a decent drop-in hotfix:
I hope this helps someone out there!
I'm not really raising this issue looking to see a fix to a 5+ year long issue, people have lives to live, and I'm not looking to demand free work.
I just hope to make the purpose of this post clear and give others the chance to solve this kata, because I really have enjoyed the series so far! <3
I thought that Kata was pretty good, yet I cannot submit my solution or view test cases or spoiler comments without forfeiting eligibility. Is there a reason why it is now a draft again and not published?
Rejected:
No random tests
Initial solution setup does not compile
Named parameters should not be used unless there is a valid reason
Not compatible to Swift 5.9 since
characters
has been deprecatedMissing useful assertion messages
Description Merge Conflict
Please refer here on how to make corresponding changes and publish a new fork
Rejected:
No random tests
Missing corresponding explanation of the module to be used in description
Outdated version
Missing useful assertion messages
Please refer here on how to make corresponding changes and publish a new fork
Rejected:
No random tests
Initial solution setup does not compile
Outdated version
Missing useful assertion messages
Please refer here on how to make corresponding changes and publish a new fork
Rejected:
No random tests
Not compatible to Swift 5.9 since
characters
has been deprecatedInitial solution setup does not compile
Missing useful assertion messages
Please refer here on how to make corresponding changes and publish a new fork
Update description to current state
Added random tests
Added assertion messages
Reorganize test structure
The available tests do not cover all cases. it would be nice to add the test 'aabacacacacacacac'
Why is my code passing some tests but not passing some other tests?
Did I understand the question wrong?
what I understood is that I should remove all duplicates and that's what I think my code is doing
Absolute annoying that we must guess which exception to be raised. Put a little more work into Kata's u created pls.
JDeBolt, your descriptions are awful. What front and back arguments are here for? I managed how to split the list, now I have to waste my time to realize how to connect the solved tasks with your useless extra arguments to pass the tests.
You should return the original list and not its copy. OP solved it though, closing...
Loading more items...