that's because in your init the list is probably pointing towards the base list, so when you delete in the object you also delete in the base list (what happens: a[0] returns 1 and deletes 1 from the a list and from the base list so base[0] returns 2 instead of 1). To avoid this, you need to do a "copy" of the base list without reference by doing something like this : self.list = baselist[:]
I'm really sorry for the problems, I have already fixed the issue, this was my first translation and I misunderstood how the tests are checked before publication.
At Example Test Cases I have changed expected value (e.g. 5) into Equals(5), Hidden test cases were fine.
When I hit the publish button, I get a message 'Kumite was published with failed tests!' below highlighted in orange background. (But the tests all pass.)
This comment is hidden because it contains spoiler information about the solution
A lot more to come! Thank you for the kind comment!
that's because in your init the list is probably pointing towards the base list, so when you delete in the object you also delete in the base list (what happens: a[0] returns 1 and deletes 1 from the a list and from the base list so base[0] returns 2 instead of 1). To avoid this, you need to do a "copy" of the base list without reference by doing something like this : self.list = baselist[:]
Thanks for the feedback!
This comment is hidden because it contains spoiler information about the solution
I've just published a new fork: https://www.codewars.com/kumite/62390806809db1005c19e19b?sel=6249d54f22c35400170f7eb7
@falsetru could you fork this translation again?
I updated the description by copying Python version, then removed opposite kata link because there's no Rust version yet.
If Rust tests are fine then C++ tests are ok as well.
Ok, never mind, all good.
See https://discord.com/channels/846624424199061524/850435343789850636/956948053074514022
I'm really sorry for the problems, I have already fixed the issue, this was my first translation and I misunderstood how the tests are checked before publication.
At
Example Test Cases
I have changed expected value (e.g. 5) intoEquals(5)
, Hidden test cases were fine.Once again sorry for the problems.
I fixed random test bug, according to Python version.
What part of description should I change?
When I hit the publish button, I get a message 'Kumite was published with failed tests!' below highlighted in orange background. (But the tests all pass.)
Do I maybe need approval from you?
Done! Thanks for notifying.
Edit: Hmm, not yet, some issues, looking into this right now.
Yes. It would definitely limit the amount of viable solutions.
Loading more items...