Skip to content

Conversation

@pranavs0133
Copy link

No description provided.

@super30admin
Copy link
Owner

Strengths:

  • The student has implemented both solutions correctly and efficiently.
  • The code is well-commented, making it easy to understand the logic.
  • Appropriate data structures are used for both problems.

Areas for Improvement:

  • In Problem1, the commented-out DFS method is unnecessary and could be removed to keep the code clean.
  • In Problem2, the initial check if(cnt == numCourses) is redundant because if all courses have indegree 0 initially, the while loop will not execute, and the final check will handle it. This could be simplified.
  • The import statement import javax.swing.tree.TreeNode; in Problem1 is incorrect. It should be the custom TreeNode class or the correct import from the problem definition.

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