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.
loved it
This is quite deep solution for 8 kata
... and this also shows how the square root can be easily obtained without relying on floats. Sadly, there is
Math.sqrtor**0.5everywhere.Damn i like it
sharp!!
It is faster, provided the CPU doesn't have a multiplication circuit in the ALU - that's still the case on some microcontrollers.
Most CPU designs throughout history did multiplication in anywhere from 4-10 cycles, while bitshifting often takes 1 or 2 cycles tops. That's a 5-10x increase in performance right there!
It was common and often needeed up until the 90's, when computers and coders shifted more away from having to eke out every iota of performance from the hardware directly.
I've seen this method in prod code only once, though - from a 70+ year old guy who did firmware programming and that I worked with. I figured out the puzzle pretty quick, but I'll never forget the look on the junior's face... like it was dark sorcery deep from the tomes of old.
cool solution. first time I see negative infinity in python, noted
Very well done !
This one is pretty AND good. Just using reverse would mutate the original list. That might not be what you want. The [...list] prevents this by making a copy first.
https://stackoverflow.com/a/13104500
Reraised as an issue.
Perfect!
making sure that noobs get confused 🤣
Very clever! Good catch that you didn't need to translate '456', as their position remains the same.
This comment is hidden because it contains spoiler information about the solution
I think they meant the note about Python 2 in the description, which I just now removed.
Loading more items...