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.
Nothing node.js specific, but an awful lot of js specific
This comment is hidden because it contains spoiler information about the solution
Divide et impera
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
It is not banned, but note the language version used. This kata currently only supports Node 8, and
Array.flat
wasn't added to node until version 11.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 think that there's more solution based on another paper (or at least mine and monadius' is, which makes it two :) ). I am not sure why, is it more googleable, or what. I think I've seen the one you used but I found the other one easier to implement.
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
description updated
I was thinking the same thing. An example would help quite a bit.
Loading more items...