Ad
  • Custom User Avatar
  • Default User Avatar

    I did console to track the test #, and also to see your code's output.

    You are failing on the fixed test

    assert.isTrue(determinant(m7)===88)

    const m7 = [
      [2, 4, 5, 3, 1, 2],
      [2, 4, 7, 5, 3, 2],
      [1, 1, 0, 2, 3, 1],
      [1, 3, 9, 0, 3, 2],
      [1, 1, 2, 2, 4, 1],
      [0, 0, 4, 1, 2, 3]
    ]
    

    where your code returns -88 instead of 88.

    I hope that helps!

  • Custom User Avatar

    Ups. I am sorry, but it seems I cannot format it to make it more readable...

  • Custom User Avatar

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

  • Default User Avatar

    Would you show me your code?

    Idk how to see it

  • Custom User Avatar

    I tried to solve this problems not by recursion but with gaussian. The determinant I found for the matrix of 5x5 seems to be correct, but the test is showing me a strange "expected false to be true". Since the determinant is a number I can't figure out what is wrong here.
    The kata simple said you should return the determinant not the way you should figure it out or am I wrong?

    Might try to solve it again by using recursion but still confused why my solution is not accepted.