Skip to content

Done dp-1#1941

Open
nikhilsaimarri wants to merge 3 commits intosuper30admin:masterfrom
nikhilsaimarri:master
Open

Done dp-1#1941
nikhilsaimarri wants to merge 3 commits intosuper30admin:masterfrom
nikhilsaimarri:master

Conversation

@nikhilsaimarri
Copy link
Copy Markdown

No description provided.

Solved using Memoization
Added Tabulation
Implement dynamic programming solution for House Robber problem using two variables.
@super30admin
Copy link
Copy Markdown
Owner

  • Strengths:
    • The student has implemented both memoization and tabulation approaches for the coin change problem, showing a good understanding of dynamic programming.
    • The house robber solution is well-optimized and follows best practices.
    • The code is generally readable and well-structured.
  • Areas for Improvement:
    • The memoization solution for coin change has a logical error in the memoization check. The dp[idx][t] check should be at the beginning of the function to avoid redundant calculations.
    • The tabulation solution is correct but commented out. It would be better to uncomment and use it or remove it if not needed.
    • The memoization solution could be improved by initializing the dp array with a more appropriate value (e.g., Integer.MAX_VALUE) to avoid confusion with the -1 check.

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