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.
As akar-0 points out it is a valid JavaScript variable name (in fact there's a couple popular libaries built around it), but the convention originated in some other language (or perhaps even a linter?) to use
_
as a shorthand for "this argument isn't used".This kata seems to have no point other than to snark on kata titles.
Description should make it clearer that an object with numeric keys is the expected return value, preferably with an example.
This comment is hidden because it contains spoiler information about the solution
It's kind to include at least one test case.
This comment is hidden because it contains spoiler information about the solution
This is shooting for minimalist, not most performant.
This comment is hidden because it contains spoiler information about the solution
Not sure if this is slightly too obscure for a Best Practices vote on a low level kata, but it's a standout in that it constructs the regex at the time the code is first interpreted rather than whenever the function is run.
I feel the same way. The artificial constraints make this an anti-kata, or a lesson how not write Javascript.
Didn't read the part of the instructions requesting to keep it recursive (and the memo private), corrected version below.
Seems like every test case has the same number of voters as candidates, this let my solution work even with a bug. Should have at least one test case where the number of voters >> number of candidates.
Just noticed there's a bug in this, I'm considering the majority to be the number of candiates / 2, not number of voters / 2.
The gender specific description is offpoint and should be reworded--"businessperson", "office worker", "worker" should work most places.
I realize the description doesn't mention performance, but a lot of these solutions are worst case brute force and I'm not sure the kata is really teaching them anything. Maybe should include a pointer to Wikipedia in the description to encourage people to consider implementing a more reasonable algorithm? http://en.wikipedia.org/wiki/Methods_of_computing_square_roots
Loading more items...