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 love this!! It makes me think of a squirrel eating a slice of bread :)
Hi, thanks for letting you know. I have amended my solution to support unsigned types and just resubmitted it.
This solution is going to be invalidated because the kata will be changed to use more suited unsigned types. I let you know so you may want to submit a new mended version.
consider to replace unconditional
n as i64;
byi64::try_from(n).unwrap();
.See
haha,not really, i woke up yesterday with the urge to implement long addition from scratch and I got the best example to test my implementation here. I can also confirm that my first solution was implemented 2 years ago,when I came across a small version of the BigInt library on github. Thanks for discussion, feel free to check out my other solutions to katas since I'm a 2kyu.
It's best to drop a "it's a joke/cheat, already solved it with (insert the general approach here)" legitimately :). But anyway, it gave me laughs.
Well, my second solution shows the basic way of solving the kata with no cheats, hope that proves that i can solve this.
/* using Basic long addition */ its so fast with O(n) time complexity but more space is used. */
haha, bro, work smart not hard.
Uh, did you ~~~ use the BigInt library? You ruined the kata xD
This comment is hidden because it contains spoiler information about the solution
I'm using a different version of Nodejs (v14.16) and all my tests passed but on here with version 8, they failed. All 103 passed by 20 keep failing yet, I got the right output even with the failed cases on my pc.
LOLOLO
Thanks for pointing that out. I wouldn't use this solution in production code. Thanks once again.
In the grand-scheme of things this is often deemed bad practice in JS. Mutating the Array.prototype object properties directly as if to add one, also, often fails a linter...
When I ran "Submit" the first time, it came back with 100 fails.
I added some console.logs and re-ran it, it came back all green.
I removed the console.logs and got another 100 fails.
I added the console.logs back in and it completely submitted, without giving me a chance to refactor.
Which is to say, I think the platform itself may be having issues.
Loading more items...