Ad
  • Default User Avatar

    Lua translation Can someone review it ? Thanks

  • Custom User Avatar

    For the life of me I could not figure out a solution yet alone an elegant one, is anyone able to give me hints/tips? I don't think this is a 7kyu kata, I might be wrong though.

  • Custom User Avatar

    ( 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
  • Custom User Avatar

    The description can be polished in my opinion. This line is not helping:

    Surprisingly, they had a lot of pieces (we suspect Marcus is a part-time thief, but we will leave that aside), 
    and Marcus wondered in how many different positions could 8 towers (rooks) be in the board, without threatening themselves.
    

    Why 8, not 3 or 2?

    I would write something like:

    Surprisingly, they had a lot of rooks/towers (pieces that can only move vertically or horizontally) and a special chess board that can take any size needed.
    Marcus wondered in how many different positions could 'n' rooks/towers  be on a n*n board, without threatening themselves.
    He started with a 2*2 board chess and found 2 positions. Then he took a 3*3 board chess and found 6 positions.
    Then he wanted to try on a 50*50 board chess but it was too difficult to remember what he already counted.
    
    Rose (who was smarter) was thinking the solution might be simpler than it looks like.
    

    Also it's not written anywhere that "towerCombination(n)" will be held on a n*n chess board.

    Finally the "drawing" representing the solutions, there is no legend. At first I was seing the 0 as the rook, not the x.