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.
I've been trying to do it for about a year) I've done it. Many thanks for this amazing kata!)
This is irrelevent, as the kata only concerns itself with arrays that are expected to always have exactly one unique element.
try [1,1,1,2,2] :( will not work correctly to find a unique number because the array does not have a single unique element; it contains two numbers that each appear multiple times.
This comment is hidden because it contains spoiler information about the solution
in this approch you iteraite all of an array which is unneccery you shout take a sample
It's more complex that it looks for a first sight
RISC-V Translation
Well this has a time complexity of O(n log n) when there's a way to do it as O(n) which would be better since we need to ensure performance.
I was trying with the same number of bits but now I find the problem, no rule says we need to have the same number of bits.
Thanks for your answer.
Very nice kata of the ASCII art series, funny to solve and quite challenging to learn from.
And how many 1s has 256 in binary? You have to return the next higher number with the same amount of 1s in its binary form. 128 has 1 too.
But if the number 128 in binary has only one "1", why did you put the correct answer is "256" when in this case "256" in binary is "100000000"?
This comment is hidden because it contains spoiler information about the solution
I made one in c#
Expected method name doesn't follow C# naming rules / conventions.
Loading more items...