Ad
  • Default User Avatar

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

  • Default User Avatar

    My code (JavaScript) failed on some tests, and I discovered that this happened because one or more of the arrays provided were empty, although the description mentioned that this couldn't happen. Anyway, I changed my code to treat empty arrays as hands with 0 score, but my code still failed. Then, I found out that this happened because the players with no cards in their hands were supposed to win! I don't know if the empty arrays are provided on purpose, but your algorithm is not correct, as it considers players with empty hands winners.

    EDIT: I later found out that players with empty hands are only considered winners when the croupier's score is greater than 21.

  • Default User Avatar

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

  • Default User Avatar

    The initial setup for JS is unnecessary complicated. Instead, a single function can be used, like this:

    function getPerimeter(width, length){
      // Your code goes here
    }
    

    or this:

    const getPerimeter = (width, length) => {
      // Your code goes here
    }
    

    As this kata is too simple, it will appeal more to beginners. The simple syntax will be more helpful for them, as they might not understand the complicated initial code.

  • Custom User Avatar

    Sample tests for BF should be added.
    Current ones do nothing.

  • Default User Avatar

    Very simple and basic, not challenging at all.
    Most languages already have built-in functions to check if a variable is an integer, so you should consider disabling them to make it more challenging.