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.
yo! brilliant 👍
an4
читал задачу ничего не понял ,но посмотрел примеры и понял
Java translation
yeah, I always forget you can do it this way. it's smooth.
Agreed. The recursion has to be killing their time. My code is about 35% faster than theirs. I don't understand bitwise operators yet. My code and yours run neck and neck.
It seems like you should be able to shave some time off of yours by changing your for loop to somehow account for the actual bit size of 'n' instead of using 32 bits regardless of 'n'. A little above my grasp thus far in my coding journey.
Forked & approved
Enabled in this fork
the solution has: Time 𝑂(𝑚loglog(𝑚)+𝑛(𝑚/log𝑚)), Space 𝑂(𝑚)
where 𝑚 is max value from a given array
the illegal values! xD
thats what i mean, my solution was way too long compared to this beauty
why. Its good
I'm kicking myself because of this code
neat, but not a best practice at all, which thankfully the votes have reflected haha
I'm genuenly confused why this comment would make people upset, but whatever.
This kata wants you to calculate the perimeter, not the area. You can look up on google what is perimeter of 2d shapes. So, the test is correct, it's 12.
Loading more items...