Problem1 and Problem2 added#1532
Conversation
Least Falling Path Sum (Problem1.py)It appears you have solved the wrong problem. The problem you were assigned was "Least Falling Path Sum", but your solution is for "Delete and Earn". Please double-check the problem statement and ensure you are solving the correct problem. For "Least Falling Path Sum", you need to consider a dynamic programming approach that works on an n x n matrix. The problem requires finding the minimum sum of a falling path from the top row to the bottom row, where from each cell you can move to the cell directly below, diagonally left below, or diagonally right below. Here are some pointers for solving the correct problem:
You can also optimize space by using only the previous row for calculations, reducing space complexity from O(n^2) to O(n). Please revisit the problem statement and implement the solution accordingly. Always make sure you are solving the correct problem by reading the title and description carefully. VERDICT: NEEDS_IMPROVEMENT Delete and Earn (Problem2.py)It appears there has been a mix-up in the problem. The code you submitted is for "Unique Paths", but the problem you were supposed to solve is "Delete and Earn". For "Delete and Earn", the key insight is that when you choose to take a number, you cannot take its immediate neighbors (nums[i]-1 and nums[i]+1). This is similar to the "House Robber" problem where you cannot rob adjacent houses. Here's a suggested approach for "Delete and Earn":
You should implement this logic instead. Your current solutions for "Unique Paths" are well-structured and show a good progression from recursive to optimized DP, but they are not applicable here. VERDICT: NEEDS_IMPROVEMENT |
No description provided.