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.
THIS is for you, then...
And the reason is pretty simple: the approach to use is "different"... (and don't discuss that sentence here, please ;) )
I find it a pity that boundaries with 2 consecutive corners (
++
) are not tested; I see no reason why not, except that it would break some already submitted solutions.Strongly agree with this one. as it make the tryCode to be a simple function without the need of caching the previous guesses.
Nice little test. One bit was a little confusing.
Took me a few minutes and a number of attempts before I figured out I was reading it wrong. You migh be able to write a bit more clearly perhaps.
But I enjoyed doing this one. Well done!
I absolutely agree with this. I think this would make for much more interesting algorithms, and a more realworld type scenario.
@iamzuul, there are more than 3 different tests applied when you submit.
You can see the test input if you log the argument to your function with console.log(...)
Sure. Even worse; you have to construct an array representing the entire string before you visit the elements with reduce().
It's a toy solution to a toy problem, but the straight forward imperative solutions are boring ;)
I've submitted a boring solution as well now (with eager exit).
http://www.codewars.com/dojo/katas/reviews/52774a314c2333f0a700068b/groups/528a437009e419289d000f20
I've also submitted a tail-recursive solution, with eager exit:
http://www.codewars.com/dojo/katas/reviews/52774a314c2333f0a700068b/groups/528a446509e419076d000f27
@xDranik: randomising the order of the test might do the trick.
@Bloodyaugust: no hard feelings, but I think it is clear that this is cheating in the same way it would be cheating to answer a math test in school by answers provided to you beforehand. In some cases (and katas!) the explicit goal is to pass the test-case, but in most the test-cases are merely there to validate that the solution meets the requirements for certain arguments.
I think the calling sequence is backwards; the framework calls our function a number of times, with hints, in order to get a solution, but then we get the problem of the initial null guess.
I'd prefer to providing the user with a "guess"-function (maybe as an arguemnt), to be called with the current guess, and having it return the indications, and then limiting the number of times this function may be invoked.
I submitted a brute-force implementation by mistake ...
I think the kata would be more interesting if you'd need something like a binary search to find a solution.
Flagged with 'minor issues' due to this, but I'm not sure if that is in line with the protocol.
Surely it's cheating; you're overfitting the function so it doesn't meet the requirements of the specification, only the test.
I don't really care that you cheat, but it seems like a quite empty experience, and even if you gain some small amount of "honour" you gain no understanding and make no real progress.
Your loss, the rest of us make do ;)
Good! Then it's only a small matter of programming... ;)
( And the time to do it )
The error message indicates that the solution fails for nthFibo(1) ( the 1-st Fibo ).
This looks interesting!
One question: are we guaranteed that the shapes will have an area?
In other words, is this a legal shape:
or is
the minimum shape?
I not an expert on the requirements of the various kyu levels, but level 4 is way off for this problem.
The description for level 7 lists (among other things):
which seems about right for this problem.
Loading more items...