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.
this is an interesting one!
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.
Loading more items...