Ad
  • Custom User Avatar

    Python new test framework should be used

  • Default User Avatar

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

  • Custom User Avatar

    ( JS, probably others )

    Random tests almost always expect false. Needs random testing with biased cases.

  • Custom User Avatar
  • Custom User Avatar

    The colored text is hard to read in dark more.

  • Default User Avatar
      [[64, 63, 3, 4, 5, 6, 58, 57], 
       [56, 55, 11, 12, 13, 14, 50, 49], 
       [17, 18, 46, 45, 44, 43, 23, 24], 
       [25, 26, 38, 37, 36, 35, 31, 32], 
       [33, 34, 30, 29, 28, 27, 39, 40], 
       [41, 42, 22, 21, 20, 19, 47, 48], 
       [16, 15, 51, 52, 53, 54, 10, 9], 
       [8, 7, 59, 60, 61, 62, 2, 1]] 
       
       should equal 
       
       [[64, 2, 3, 61, 60, 6, 7, 57], 
        [9, 55, 54, 12, 13, 51, 50, 16], 
        [17, 47, 46, 20, 21, 43, 42, 24], 
        [40, 26, 27, 37, 36, 30, 31, 33], 
        [32, 34, 35, 29, 28, 38, 39, 25], 
        [41, 23, 22, 44, 45, 19, 18, 48], 
        [49, 15, 14, 52, 53, 11, 10, 56], 
        [8, 58, 59, 5, 4, 62, 63, 1]]
    

    AFAICT that is also a magic square. So why isn't it an acceptable answer?

  • Default User Avatar

    I really like this Kata, but my Algo is too slow :D
    I pass the sample tests, but I get a timeout when I run against the full test suite... Can you tell me what n is in the test suite?

  • Custom User Avatar

    The kata expects a specific arrangement of magic square out of many magic squares but it is mentioned via a... hint?

    No, that's not a hint, that's a mandatory requirement of the kata itself.

    Please post the information out and not slap us with yet another Wikipedia article that we have to browse away from CW just to know what the algorithm is.