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.
You were my inspiration! 💪
Thanks! But I still need to find a better way to implement my
countVisible
method, I do not like it 😕This comment is hidden because it contains spoiler information about the solution
I am generally not a fan of forcing a particular implementation, and especially not by restricting available language features. ( Nor am I a fan of trying to increase difficulty setting restrictions, but I think that's not the case here. )
A kata can measure output correctness, and it can measure time complexity ( with careful test design ). If you cannot distinguish by way of either of those, the particular implementation apparently is as good as your favourite one. ( Ignoring space complexity here for simplicity. )
I would not say this kata just tests knowledge of JS syntax. It tests problem analysis and modeling, in light of available language features. If you can use fast datatypes to solve a particular problem, I think that's OK.
Maybe part of a solution to your problem is allowing duplicates in the input or output? That would make the available fast JS feature less useful. ( I haven't fully thought this through - that's your job! :P )
This comment is hidden because it contains spoiler information about the solution