• Custom User Avatar

    It's been discussed before, read it: https://www.codewars.com/kata/521c2db8ddc89b9b7a0000c1/discuss#5da990697b24c4001e188501 it wasn't an accident, it was the kata's author choice. Too late, unfair (it'll probably render all current valid solutions invalid) and useless to change it. Cheers.

  • Custom User Avatar
  • Custom User Avatar

    So what you're asking for is to invalidate existing 40k solutions to please you. Not saying anything, but I don't think it's gonna happen :P It may or may not be correct, but it's too late to change it now.

  • Custom User Avatar

    Of course it was a choice, but choices don't need to be permanent. In an open community like this one, we should be able to examine the reasoning behind them and perhaps reconsider them.

    Also, since the result was an incomplete representation with an exception that had to be spelled out in a post-post-script (with a typo) and added nothing of interest to the problem, I suspect this particular case was more of an accident than a choice.

    I think that's enough said about a detail of a random programming problem on a random website. Feel free to post another defensive reply but I encourage you to look at your motivations for doing so beforehand.

  • Custom User Avatar

    That's a design choice, the tests only use square matrix, n x n, the only exception is when n = 0, the author chose to use [[]] to represent that, maybe because he wanted to keep the idea of 2 dimensions. It's stated in the description and your code should resolve that.

  • Custom User Avatar

    Thanks for your reply, though I was already aware of that note. Obviously I'm new to this site and don't know how things work around here, but I'd hope that, before deciding to raise an issue with a kata, most people would feel obliged to read its full description and trust in others to have done the same.

    To address the content of your reply, I'd suggest that simply asserting a statement does not make it true.

    If you can find the time, please try this little challenge:

    Under the scheme where [[]] represents the 0 x 0 matrix, what representation does the 1 x 0 matrix have?

  • Custom User Avatar

    NOTE 2: The 0x0 (empty matrix) is represented as en empty array inside an array [[]].

    Last line of the description.

  • Custom User Avatar

    Working in Python, so I don't know if this issue affects other languages.

    There is a test case for [[]] but this is actually a malformed input, representing a 1 x 0 array ie. not n x n.

    Consider [[],[]] and [[],[],[]] which are 2 x 0 and 3 x 0; an array which is zero in one dimension can be nonzero in another dimension.

    The correct representation for a 0 x 0 array, which I think the test case should be changed to, is simply [].