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 used a solution similar to this one at first and passed but when I came back and tried an optimized version the optimized code does pass but this old version won't anymore. I think sometimes you can get lucky with this approach if the randomized tests are smaller numbers, but in general they expect the solution to be more optimized. This should probably be higher than kyu 6 imo because 7's generally don't care so much about optimization and this unoptomized approach is the more obvious answer.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
CodeWars JS challenges use NodeJS and some katas use older versions of Node. This one uses Node 8.1.3 which is from 2017. BigInt wasn't supported until Node 10.4.0. You can see on the practice page which version of Node it's using. Sometimes it lets you select between a few different versions but this one only allows 8.1.3..
Test results are completely usless for diagnosing what I did wrong in JS.
JS version tells you to use a library but doesn't tell you what the library is called. Impossible to complete this kata using the information provided.
Good kata but felt too east for 5kyu. Should have been 6.
+1 for readability
Yeah, JavaScript. My problem isn't that I got the kata wrong. I'm sure I could have fixed it if given the chance. I just think it's bad design to have some of the most basic edge cases not in the default test cases. If there are a few known edge cases that would invalidate code that works in all other cases, those edge cases should be included in the tests. But it looks like this kata is like 9 years old so I doubt he'll read this. Oh well.
This comment is hidden because it contains spoiler information about the solution
Bruh.
This comment is hidden because it contains spoiler information about the solution