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.
and it was actually the only thing that made the kata solvable, since the reference solution is wrong.
Creating good katas is hard. You have to come up with a fresh idea and that idea must fit into the concept of a kata. That's much harder than solving katas.
But that's how it should be. As students we don't want a few good katas lost in a sea of mediocre ones, right?
I'll make a prediction: This kata will not get enough positive votes to make it out of Beta.
I'd suggest that you retire this kata and wait until you have an idea for something new.
There are several problems with this kata:
Math.ceil(Math.log2(array.length))
times. Imagine the smallest value is at the right. You needarray.length - 1
iterations of the inner loop to get it to the left.it
is a description of the test."Yes"
is not a description.Test.assertSimilar()
. That function converts both arguments to strings and compares those strings. The message is unnecessarily hard to read. UseTest.asserDeepEquals()
instead.bubbleSort.toString()
and search that string for the substring"sort"
. There are many techniques to circumvent that, e.g. what mrtp0 did.This comment is hidden because it contains spoiler information about the solution