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.
[float('inf')]
Fork here.
at first, I wanted to set the condition in a different way. Inputing the string like '2x^2 + 4x + 5 = 0' and needs find roots. But i think that it hard for 7 kyu and for 6 kyu it not interesting to solve this kata.
That you think, maybe make case of '2x^2 + 4x + 5 = 0' and gives it on 6 kyu?
There already are:
... and probably a few more which I did not find now.
Are you sure we need yet another matrix rotation task?
it looks alike but with differences:
and as a kata suite, i think it's better suited for progression
Hello, not sure to understand. But is it related to "NameError: uninitialized constant Rotator" error?
If yes, i've fixed it.
it looks alike but with differences:
and as a kata suite, i think it's better suited for progression
Hi, thanks for the continued checking of the kata :)
I don't remember fixing this, but it's fixed now, another thank you if you did it yourself.
I updated the test cases according to your suggestios. I encourage you to update Haskell translation accordingly.
Change in ConstraintsConstraints set back to 500 but includes 0.This comment is hidden because it contains spoiler information about the solution
I added some index-predicated tests for all applicable methods now, although of course there's still just not a lot of tests in general. I mentioned the lack of index-predicated tests in the first discourse comment.
You're right on
fill
, alsopush
. I modified the kata description.I think all tests here are
===
as it should be (?), but maybe you're referring to python's===
vs==
, in which case yes it looks like I'm checking itemwise by reference, which is what you would expect. But also yes, the tests are not currently making sure that e.g.map
is not modifying the original array. Although that would affect thearr20
variable which would make subsequent tests fail. Theoretically it could be undetected for the lastreduce
test, but I think it's fine for a 5kyu.It might make sense to have a 4kyu kata about implementing all array methods exactly (including sort and negative slicing and
thisArg
), with all the fun behaviours. This is more of a "do you know which array method corresponds to which intention" test. In the description I do mention we're looking at common usages rather than exact replicas. Let me know if you think that should be made more obvious, or how to handle itI wasn't aware of this reduce behaviour, fascinating! Fixed
Took care of enumerability. And good catch on the
format
bug, I must have been really tired :)Also checked that
const push = [].push.call
won't work, and I'm not 100% sure why. I wonder if there's other workarounds the user has, given that when user code first runs, array methods are accessible (just not when the functions are being called)Great point on enumerability! I was just happy I got the concept to work, I didn't think about that.
I saw
[undefined]
too on empty arrays and am not sure why. I figured it would be theformat
function but at first glance it seems ok. Unfortunately I have very limited time these days, if you have improvements and the time/will to implement them, please go ahead!I made the kata primarily so I could give a student an exercise I thought would benefit them, and was surprised something like this wasn't already on codewars. That purpose is achieved. For the sake of the codewars community I intend to work on this kata more until it's considered ready, but it might take a while.
Ok, thanks.
console.log
issue mostly fixed, and republished.Loading more items...