Ad
  • Custom User Avatar

    Yeah I saw that after I posted the issue, but decided to leave it up because although this problem elects to ignore that it's called "matrix" rotation. To my understanding in programming the term matrix is not applied to one dimensional arrays, and outside of things like C# multi-dimensional arrays the only thing that would actually meet that criteria is nested arrays.

  • Custom User Avatar

    This kata doesn't currently test for a scenario of nested arrays/lists. there should be tests akin to
    (
    [
    [1,2,3],
    [4,5,6].
    [7,8,9],
    ],
    [
    [7,4,1],
    [8,5,2],
    [9,6,3],
    ]
    ),

  • Custom User Avatar

    Correct, this will return False if it is odd and True if it is even. I've seen some more complex mathematical methods to detect if it's a power of two with just simple arithmetic but what would probably be easiest is to import Math and do return False if math.log(n, 2)%1 else True