Go icon indicating copy to clipboard operation
Go copied to clipboard

feat(uniquepaths): add solution for unique paths problem

Open rares985 opened this issue 1 year ago • 2 comments

Provides a solution to the "Unique Paths" problem. That is, in how many ways can you traverse an m x n matrix from (0, 0) to (m-1, n-1)

rares985 avatar Apr 17 '24 09:04 rares985

This looks like a good implementation of the dynamic programming solution for the "Unique Paths" problem. One minor adjustment I would suggest is to remove the +1 when creating the grid. Since you're using zero-based indexing, allocating m+1 and n+1 for the grid creates unnecessary space. Simply use m and n instead. This adjustment makes the code a bit more concise. Other than that, the logic and implementation seem correct!

sozelfist avatar Apr 18 '24 01:04 sozelfist

@yanglbme, @raklaptudirm Could you please review?

rares985 avatar Apr 22 '24 14:04 rares985

@raklaptudirm, could you please have a look over this PR? It's been sitting here for 3 weeks.

rares985 avatar May 09 '24 08:05 rares985

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.43%. Comparing base (2354582) to head (0d756b0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #716      +/-   ##
==========================================
+ Coverage   87.36%   87.43%   +0.07%     
==========================================
  Files         201      202       +1     
  Lines        5333     5347      +14     
==========================================
+ Hits         4659     4675      +16     
+ Misses        534      533       -1     
+ Partials      140      139       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 11 '24 09:05 codecov-commenter