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.
Hi, thanks for letting you know. I have amended my solution to support unsigned types and just resubmitted it.
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.
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.
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.
Guys, just ran the same tests with my solution on my pc and everything passed by on here. they don't run. I don't understand why. Could it be because of different version of node.
My solutions run with the correct out(using the same input) but on here, it's a different case.
This isn't the most efficient way to solve this problem (cause of more allocations) . I've tested all the solutions given here and they all seem to cause a stackflow if more than 3500 elements are used(with Cons::From method).
For anyone who wants to solve the stackflow over flow problem, fork a new thread with increased stack-size using the threadBuilder as shown below
With Udiknedormin's solution, you build the list with upto 26000 elements using the config below
thanks
Hi mate, whoever translated this kata to Rust, if you can tell me that
assertion failed:
(left == right)
left:
[(20174, 34060), (2184, 3406), (25545, 34060)]
,right:
[(20174, 34060), (21840, 34060), (25545, 34060)]
correct this, my left form is the simpliest at. Clearly if there is 21840/3460, you simplifies further to 2184/3460. Don't let me cheat
This kata would do with more tests including random ones. I can't believe a 5kyu kata would be this easy.
would the creator of this kata add big.js ? its much faster than bignumber.js. would really appreciate it.
All the problem have been fixed. NO JSON.parse method, tests are working.
Loading more items...