5 kyu

Submatrix

Description
Loading description...
Matrix
Algorithms
View
AllIssues3QuestionsSuggestionsShow Resolved
  • Please sign in or sign up to leave a comment.
  • trashy_incel Avatar

    This comment has been hidden.

    • JohanWiltink Avatar

      Fixed again here - please ( review and ) approve.

      I don't really understand how it's possible it broke. @dfhwze forked the kata a week ago, but that should have forked the fixed version. ( Eight years ago forking was not available - I probably just edited the kata directly, so there should be no wrong version to fork. )

    • trashy_incel Avatar

      thank you :)

      no idea how it regressed either :(

      Issue marked resolved by trashy_incel 2 months ago
    • dfhwze Avatar

      There used to be a bug that when forking, you didn't always fork of the latest version. Perhaps that occured again here ..

  • RealKenshiro Avatar

    This is really a great Kata with many different tasks to deal with :

    1. generate the square matrices
    2. compare deeply two matrices for uniqueness
    3. sort matrices

    Very satisfying!

  • G_kuldeep Avatar

    matrix : [ [ 9, -6 ], [ -9, 5 ] ]

    Expected:     '[[[-9]], [[-6]], [[5]], [[9]], [[9, -6], [-9, 5]]]'
    instead got: '[[[9]], [[-6]], [[-9]], [[5]], [[9, -6], [-9, 5]]]'
    

    how and why???

  • docgunthrop Avatar

    Underrated kata that deserves more attention. Nice job @surtich 👍

  • JohanWiltink Avatar

    There's something weird with the random tests.

    The 1×1 test expects [] instead of [[[ <value> ]]].

    My code should not generate (empty) submatrices for a 1×1 matrix, and does not for hard-coded test cases, but does for the random 1×1 matrix, and the tests of bigger matrices somehow generate submatrices twice - but this is then filtered out and the final answer is the same.

    Exactly what code do you use to generate random test matrices? (Just that part, not the actual solution.)

    I cannot see anything weird about the inputs with console.log().