Skip to content

Conversation

@vvirani1908
Copy link

No description provided.

@super30admin
Copy link
Owner

  • Strengths:
    • Both solutions are correct and handle edge cases appropriately.
    • Time and space complexity analyses are accurate and well-explained.
    • Code is clean, readable, and well-commented.
  • Areas for Improvement:
    • In Problem1.py, using a list for queue operations (pop(0)) is inefficient. Consider using collections.deque for O(1) popleft operations.
    • In Problem2.py, the early checks (if not q and if count == numCourses) are good, but the logic could be slightly streamlined by moving the count increment inside the loop where the course is added to the queue.

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