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.
This comment is hidden because it contains spoiler information about the solution
i guess there is no proper way to do this using TimeSpan.ToString formatting directly ?
...maybe that's the "catch" of this kata
Let the compiler optimise that.
I wrote the same code but for some reason my test kept insisting I always returned 0 xD I even tried just returning elements of the input but it still said 0 every time.
I disagree with "shortest runtime == best", in general. Legibility and maintainability are often more important. Runtime (and memory space) optimizations can be important in some cases, but you need to have a look where it makes most sense and try to avoid premature optimization.
Simply amazing! And still quite legible for a one-liner. Though, in production code, I would prefer to have the clipping factored out in its own function.
what does the $ sign mean?
Why Object.assign(this, {firstName}) is used here instead of this.firstName=firstName? I haven't seen this method mentioned in a JavaScript book.
upd: copies into an object... Genius!
my code looked something similar to this, but I couldn't get "numbers == null" to identify a null array. I had to use: "numbers?.Any() != true"
very nice
yep)
But that's being super-pedantic since you're returning a list and not an array. It's a shared description. Imo returning a tuple in this context makes more sense for Python.
Even though they say return array not tuple test cases are passed.
Here you return tuple instead of array
😄👍
nice way to keep it simple and understandable
Loading more items...