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.
Thank you for more understandable explanation.
I resolved the issue.
Random tests always expects
False
, and it is an issue. Random tests which all expect the same answer are ineffective, and do not help anything.There are ways to create random test suites for problems where random spray is ineffective, for example generating 20 or 50 or 100 "normal" numbers, and shuffling them together with 5 or 10 or 20 predetermined, possibly repeating, perfect numbers.
But you could generate one from time to time picking one of a previously generated list, couldn't you? Random tests shouldn't expect always the same value, otherwise, you can hardcode the solution.
It is due the fact that perfect numbers are rare, and the probability that generated random number will be perfect is extremely low. It is not an issue...
Random tests always expects
False
Duplicate
this is easy enough to work around of course. but it's very, very user-unfriendly to enforce the restrictions this way.
there should also have been a separate test block enforcing the restrictions with normal test failures, instead of the fugly exceptions that are being raised in the course of functionality testing.
ETA:
sort_array = sorted
, which is a valid solution apart from the restrictions, raises the following exception:that's apparently a test error, not a code error. that's just one ( but very bad ) way in which the restrictions enforcement absolutely s*cks.
unrelated, but I'll mention it here because the kata is retired anyway: there is absolutely no reason to use a fscking BubbleSort as the reference solution. you could just have used the native
sort
- it's not forbidden from testing!but kata depending on forbidding native methods are almost always a bad idea anyway ( which you had been told ).
Look at B4B's modules forbidder.
sort
.Why the artificial restriction on empty lists? There's nothing wrong with them, they can be sorted perfectly fine.
Please allow empty lists as input.
Done.
Can you explain in a more detailed way? Because I did not recognize any issue with name
Done.
Function name is incorrect (different from imports)
thank you!
I will design random tests.
The kata is not about bubble sort. Bubble sort is just arbitrary solution. Kata is about to implement your own sorting algorithm.
Loading more items...