Ad
  • Custom User Avatar

    Ruby:

    • Attempts tests don't include fixed tests.
    • Empty matrix is not tested.
  • Custom User Avatar
    • Node 12 should be enabled (Refer this and this for more info)

    • Ruby 3.0 should be enabled (Refer this & this for more detail)

  • Custom User Avatar

    A pretty straightforward algorithm to calculate, and I was able to make a reasonably efficient one, I think...

    I feel like the description could use a little work. A few specific points:

    • You never say "top-right" or "bottom-left" in your description, which is pretty necessary information if the reader's going to actually produce something along the right lines.
    • You should also say if the diagonal itself (items along that line) should be 0 or not.
    • The examples are useful, but it's hard to see how they actually form a grid. Perhaps something like the below would be easier to visualise?
    upperTriangular([
      [1,1,1],
      [0,1,1],
      [0,0,1]
    ]) == true
    
  • Default User Avatar

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