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 found your objection here confusing until I thought about it.
Fundamentally, I agree. However, I think the underlying problem isn't the logic of planets leaving the system. That's a symptom. The problem is that the orbits change. As you note, if a planet leaves the system on the left, all other planets shift to fill lower orbits. However, if a planet is destroyed the same thing happens. The logic is consistent and solvable, but it's weird. There's a sort of extra movement built into it.
My biggest complaint, I think, is that the series didn't build upon itself. It would have been great if each new entry in the series added instead of being essentially the same with a different skin.
See above, I think the timing assessments are off by a factor of 10.
js fork approved
Sorry, this is my first attempt at creating a kata. I don't understand what the problem is in my description. Maybe you can help me?
This comment is hidden because it contains spoiler information about the solution
ready
ready
If I'm not mistaken :
I don't see any drafts.
not arr
isO(1)
, but in that case,any(arr)
is alsoO(1)
. so not showing the base case doesn't make the solution slower. that's what I meant, and yes, I should have worded that more carefully, there are definitely situations whereany(arr)
is more computationally intensive thannot arr
.not any(arr)
isO(n)
, but iffnot arr
, that'sO(1)
. but only in that case, true.OMG.
There was a bug in a testing loop.
This code was intended to fail only one assertion per test case.
But the outside loop tested for sameness while the assertion inside tested for equality, so the solution that returned identical rectangle instead of the same rectangle got assertion right, and then early return - performing only one instead of large numbers of checks beating thus beating the tests.
This too was resolved many moons ago.
Marking this long-resolved suggestion as resolved.
Fixed (8 years later :D)
Loading more items...