Ad
  • Custom User Avatar

    You were my inspiration! 💪

  • Custom User Avatar

    Thanks! But I still need to find a better way to implement my countVisible method, I do not like it 😕

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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 )

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution