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 code does not pass the C++ tests anymore
Namely, here: https://docs.python.org/3/library/stdtypes.html#set
check the api docs?
This comment is hidden because it contains spoiler information about the solution
Fixed. Thanks for reporting.
Look at the other solutions. You will see that there are ways to build the result forward without a temporary list.
In fixed tests numbers are rvalues, so the first version is called. This function happens to pass all fixed tests.
In random tests numbers are lvalues, so the second version is called. It modifies the number and the reference implementation is called after the solution, so it returns the result for the new value.
There are no solution prototype declarations or explicit type casts in the tests, so any matching solution function is used.
Generally it's just bad tests, but it may not be a big deal for a 7 kyu kata.
These solutions do not comply with the requirement: "Try generating the elements of the resulting list in ascending order, i.e., without resorting to a list reversal or prependig the elements to a list." Elements are pushed to and then popped from a stack, which effectively results in a list reversal.
Currently Codewars platform has lots of issues. It's not a problem of this kata. See:
https://github.com/Codewars/codewars.com/issues/893