Skip to main content
RoyaumeIX's user avatar
RoyaumeIX's user avatar
RoyaumeIX's user avatar
RoyaumeIX
  • Member for 7 years, 8 months
  • Last seen more than 3 years ago
awarded
comment
Find the longest rectilinear path in a matrix with descending entries
@holroy please read the comments on the first response so you'll understand why I edited the test.
comment
Find the longest rectilinear path in a matrix with descending entries
@holroy I did not change the logic of the code, I made it more clear. changing the test data doesn't affect the algorithm on how it is running.
comment
Find the longest rectilinear path in a matrix with descending entries
@Phrancis'DROPTABLEUsers-- the last edits I made were to make my problem more understandable. if you understood what I did, it was mainly making a different test so the output would be clear, as answers below didn't answer exactly to the problem. I DID NOT use answers from below to enhance the code.
revised
Loading…
revised
Loading…
comment
Find the longest rectilinear path in a matrix with descending entries
@kezzos Sorry if the goal wasn't that clear, here it is: * Find the longest path following these rules. Longest path means the maximum number of nodes where we are always going down. * If we have many longest paths with equal distance ( number of nodes), then we should get the one with the maximum drop ( value of 1st node - value of the last node).
revised
Loading…
comment
Find the longest rectilinear path in a matrix with descending entries
This approach is very interesting, this is what I needed! running it on 1000 x 1000 array took me just 45 seconds.
awarded
awarded
awarded
awarded
revised
Loading…
Loading…