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.
Nice kata! I was finally able to solve it. My first attempt was two years ago, and I failed 3 or 4 times in the past. xD
This comment is hidden because it contains spoiler information about the solution
哥们拿布尔值炫技呢 如果赢的加四分你不炸了
I agree, I had a similar thought myself.
Your solution is almost correct, but it returns the powers of 2 in the wrong order — from largest to smallest, while the task requires sorting in ascending order (from smallest to largest).
this kata has specs that allow for this solution:
while yeah, it is unlike a real-world situation, it doesn't matter here
if the score goes beyond single digits this will not work
I don't understand why this works but it doesn't work when I tried:
a, b = b[::-1], a[::-1]
They are still storing the correct values
Added in this fork
Added in this fork
Great idea! I had fun writing the query, t'was quite challanging.
Ts is smart asf
Who on earth writes O(n) solutions for O(1) problems
No, there are performance requirements.
Hard to solve this kata, I had to skip.
Loading more items...