Skip to content

Solved DP-1 coinchange#2004

Open
vvkumaryadla wants to merge 1 commit into
super30admin:masterfrom
vvkumaryadla:DP-1
Open

Solved DP-1 coinchange#2004
vvkumaryadla wants to merge 1 commit into
super30admin:masterfrom
vvkumaryadla:DP-1

Conversation

@vvkumaryadla

Copy link
Copy Markdown

Solved DP-1 coinchange

@super30admin

Copy link
Copy Markdown
Owner

The Coin Change (CoinsChange.java)

Strengths:

  • Solid understanding of DP fundamentals and correct implementation
  • Good use of comments to explain the approach

VERDICT: NEEDS_IMPROVEMENT


House Robber

  • Major Issue: You submitted a solution for the wrong problem (Coin Change instead of House Robber). Please ensure you read the problem statement carefully and implement the correct algorithm.
  • Strength: Your DP approach for Coin Change is well-implemented with proper initialization of the base case (amount+1) and correct transition logic.
  • For House Robber: The solution should use a simpler DP where dp[i] = max(dp[i-1], dp[i-2] + nums[i]) to track maximum robbed up to house i.
  • Code Style: Your indentation, comments, and variable naming are good. Continue this practice.

VERDICT: NEEDS_IMPROVEMENT

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