• ( JS )

    • No random tests
    • Uses Test.expect
    • Overflows Number.MAX_SAFE_INTEGER

    ( Haskell )

    • Doesn't check type signature - any (Num a,Enum a) => a -> a will do, which allows floating point types and types that will lead to overflow
  • Floating point representation inaccuracy.

    For numbers that are going to lose precision, product [1..n] is not the same as product [n..1].

  • Approved.

  • Forked ruby translation with more random tests and using snake_case kumited :) please review and approve ~~ (author of original translation and kata are inactive)

  • This.

  • But then, the pattern would become too obvious ;)

  • The kata can use more example test cases; having only two numbers can be hard to figure out a pattern in such katas.

  • Same here. This seems really dumb.

    Also, the given answer specifically checks if n = 1 and returns 1, but this is redundant when 1! === 1 anyway.

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

  • Nice kata and you have it translated into Python (despite the editor locking time and again...) and I saw there was one in Ruby already, in case you mind adding it.

  • Why is 8 towers mentioned? Does it make a difference?

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

  • same I did what you did, but it won't accept my solution for some reason...

    function towerCombination(n){
    //insert your code here
    var total = n;
    for (i= n; i>2; i--){
    total = total * (i-1);

    }
    

    return total;
    }

  • The rooks being the x makes way more sense now. The 0 being bright colored also doesn't sell the idea of the X being the rook instead.

  • Loading more items...