Skip to content

Completed DP-3 - #1558

Open
ManasviReddy25 wants to merge 1 commit into
super30admin:masterfrom
ManasviReddy25:master
Open

ManasviReddy25 wants to merge 1 commit into
super30admin:masterfrom
ManasviReddy25:master

Conversation

@ManasviReddy25

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Minimum Falling Path Sum (Problem1.py)

VERDICT REASON: [Brief explanation of the house-robber-style decision]

VER code: NEEDS_IMPROVEMENT
VERDICT REASON: The student solved a completely different problem (Delete and Earn) instead of the requested Minimum Falling Path Sum problem. The solution does not address the problem at all.

VERDICT: NEEDS_IMPROVEMENT


Delete and Earn (Problem2.py)

You have submitted a solution for the wrong problem. Your code solves "Minimum Falling Path Sum" but the assignment asks for "Delete and Earn."

To solve Delete and Earn correctly:

  1. First, aggregate the total points for each unique number in the array (e.g., if nums = [2, 2, 3], then total points for 2 is 4 and for 3 is 3).
  2. Then apply a House Robber-style DP: for each number i, decide whether to take arr[i] + dp[i-2] (take all of number i and skip i-1) or dp[i-1] (skip number i).
  3. The answer is dp[max_value].

Please resubmit with the correct solution for the Delete and Earn problem.

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.

3 participants