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.
very clean and clear
You should post this in the discuss thread of the kata you are having trouble with. You will see discuss with some speech bubbles just below the katas title. I believe this is the kata you are talking about. function within a function
There are lots of things you can do with functions in javascript. In Javascript functions are actually just a special type of object so they can be returned or even passed around.
so a function that returns another function would look something like this
I hope that helps. If you are still stuck or just want to learn more about functions in functions here are some things to research on Google
you are missing a space somehow
There should be 2 spaces before the ^ on the second line
Enjoyable kata. It would be nice to see more of these harder math katas approved, but unfortunately they dont get many people solving them
This comment is hidden because it contains spoiler information about the solution
Very good kata!
There is a minor error in your default test cases.
The last test is
But it should be
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks for approval
in the default test cases you expect "f(x) = 1x" as the answer, but in the submission tests '1x' is always converted to 'x' unless its '- 1x'. To fix simply change the first default test case to expect "f(x) = x" so that the same solution can pass the submission tests and the default tests.
This is an excellent kata. Thanks for making it
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
There are no default test cases. Thats the error you get when no tests are run. It will work when you submit. Or you can write your own tests
Wow you really went all out developing a bigint library to solve it. Impressive!
It looks like it will work all the way up to getPolydivisible(Number.MAX_SAFE_INTEGER,b)
I went the opposite direction and tried for very terse with only 3 arrow functions and a constant.
In mine ...
isPolydivisible works for arbitrary length strings but might be limited by the stack size since it is recursive
getPolydivisible will break if the result is greater than Number.MAX_SAFE_INTEGER
also there is no error checking so it relies on appropriate inputs
Its always fun to see the many different ways people solve katas
Loading more items...