Skip to content

Conversation

@melvinmilkiyas
Copy link

No description provided.

@super30admin
Copy link
Owner

  • Strengths:

    • Both solutions are correct and efficient, with better time and space complexity than the reference solutions.
    • The code is well-structured and readable, with good use of comments to explain the approach.
    • The dynamic programming approach is implemented correctly in both solutions.
  • Areas for Improvement:

    • In the coin change solution, the condition if dp[cols-1] > amount could be more accurately written as if dp[cols-1] == float('inf') to match the problem's requirements.
    • In the house robber solution, the variable current is returned, but it might be clearer to return prev1 since current is updated to prev1 in the last iteration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants