Add implementation for leetcode problems 994, 690#628
Conversation
Oranges getting rotten (leetcode_690.py)It appears you have submitted a solution for the wrong problem. The problem you solved is "Employee Importance" (LeetCode 690), but the assigned problem is "Oranges Rotting" (LeetCode 994). Please ensure you are working on the correct problem. For the "Oranges Rotting" problem, you need to:
You can refer to the reference solution provided for the correct approach. Note that the grid uses 0 (empty), 1 (fresh), and 2 (rotten), and the adjacency is 4-directional. VERDICT: NEEDS_IMPROVEMENT Importance of Employee (leetcode_994.py)It seems there was a misunderstanding: the problem you were asked to solve is "Importance of Employee" (LeetCode 690), not "Rotting Oranges" (LeetCode 994). Your solution is for the wrong problem. For the "Importance of Employee" problem, you need to calculate the total importance of an employee and all their direct and indirect subordinates. The typical approach is to use a BFS or DFS starting from the given employee ID, after creating a mapping from employee ID to the employee object for quick lookup. Here are some tips for the correct problem:
Your current solution for "Rotting Oranges" is not relevant to this problem. Please revisit the problem statement and implement the solution accordingly. VERDICT: NEEDS_IMPROVEMENT |
No description provided.