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 have a JS algorithm that gets the correct solution, plenty fast enough to not timeout.
However I am very stuck with overflow errors. If I use BigInts on a local version of Node it gets the correct answer instantly.
The kata is on an old version of Node without BigInts.
I have tried to many things. Spamming the modulus, got rid of any bitwise, tweeked my alg to keep numbers slightly lower - no luck. The best I've managed is around half of the final batch of 500 tests correct, the other half overflowed so turned out wrong. I'm at a loss.
Any tips? Efficiency not a concern since I have bags of time spare
Reading the solutions for this when compared to my, uhh, naive method was a trip. Nice kata, thoroughly enjoyed
Ohh I didn't know to check the node version... silly me.
Thanks for the heads up - I will do a manual implementation
I only use it once per puzzle so I could just manually impliment it, but it seems odd for sure
Am I crazy, is Array.flat() banned? If so, why? Code including .flat() that executes in node or in console won't on here
This comment is hidden because it contains spoiler information about the solution
I thought my solution was super janky but once I got it working it was under 2.0s.
Did I just stumble upon a cracked algorithm in my research?
Reading through other solutions and there's fancy stuff going on I don't begin to understand... to MDN I go :)
This comment is hidden because it contains spoiler information about the solution
There's a typo in the description. It says weekdays for 2 points near the end, rather than weekends for 2 points.
Also I think it could use an example of the inputs and outputs, maybe something like:
"
E.g:
Say the course has 3 recruits, Andy, Beth, and Charlie. The schedule might look something like [Andy, Charlie, Charlie, Beth, ...]
"
Or something like that idk. Might just have been me but I wasn't sure what it wanted so I started reading the sample tests and thought for a minute that the names were assumed to be a0, a1, a2 etc.
Thoughts? Edit: Sorry the formatting on this comment is awful, I have no idea how to add newlines here
This was good fun, really made you think about the algorithm because a loop will simply not cut it, no matter how much case pruning you employ
This one gave me a good laugh. I kinda just assume all katas have random tests but it seems this one missed that memo