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.
sorry for necro-replying
Can you comment on my solution, which benchmarks around 4 times faster than either yours or OP's solution? I tried to avoid iterating over anything more than once, and to avoid allocations where possible
The Rust translation doesn't have random tests
No, everything works correctly now. I just had to fix the number of seconds in a year I was using
I just realized it was because I calculated a year as 365.25 days, not 365... God, I really should've paid more attention to the detailed explanation.
This comment is hidden because it contains spoiler information about the solution
using a lambda, an "anonymous function" to make a named function is sooOoOOoOOooOooOooOo smart and definitely not bad practices. Most linters will yell at you for this.