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.
How is this different from a typical binary search kata, besides that it's doing 3 at once?
This is a borderline issue:
This kata is 99% just a binary heap implementation, with some additional data to keep track of (
prev
/next
), but this is trivial: I literally only had to add 2 lines to keep track of them (1 foradd
and 1 fordelete
) over a binary heap implementation. Butprev
/next
is practically useless anyway since the leaves in the same level aren't sorted. So I'm not sure what this adds to a binary heap.If you need
prev
/next
to traverse binary heap yourself, there are ways to do this without this information. In fact it's a kata.There isn't an existing binary heap kata though, so might as well turn it into one.
By the way, heap is almost always synonymous with priority queue anyway, so just calling it
WeirdHeap
is enough.Description needs clean-up: Sentences like
make sure references like Node firstLastLevel, Node lastPreviousLevel, and Node lastNode are properly being maintained while doing this.
are repeated twice in the same section.Nice kata, however I'd clarify in the description that we are looking for: a string
s
that minimizesmax(hamming_distance(s, w) for w in list_str)
, because this is never formally said in the description, and I had to look at the Discourse section to be able to solve it.Another way to say the same, but maybe a bit more complex, is that this kata asks us to find the string
s
that minimizes the infinity norm of the vector composed of the hamming distances between s and the strings in the list.Writing here so you can hopefully spot my message: Can you publish your java translation of "Valid parentheses" you've unpublished yesterday? Unpublished translations are not listed anywhere, I cannot review it nor comment on it. Thanks!
Description is not formatted properly.
Please read the text about markdown formatting and fix your description: https://github.com/codewars/codewars.com/wiki/Markdown-Formatting