Skip to content

Graph1:All Done#775

Open
hp6318 wants to merge 1 commit intosuper30admin:masterfrom
hp6318:master
Open

Graph1:All Done#775
hp6318 wants to merge 1 commit intosuper30admin:masterfrom
hp6318:master

Conversation

@hp6318
Copy link

@hp6318 hp6318 commented Oct 26, 2025

No description provided.

@super30admin
Copy link
Owner

  • Strengths:
    • Both solutions are correct and efficient, matching the expected time and space complexities.
    • The code is well-commented and easy to understand.
    • Variable names are descriptive, making the code readable.
  • Areas for Improvement:
    • For "Find the Town Judge", the comment mentions "Time Complexity: O(N)", but it should be O(N + E) to accurately reflect the complexity of iterating over all trust relationships.
    • For "The Maze", the BFS implementation could be further optimized by breaking early if the destination is found during the rolling phase, though the current implementation is already correct.
    • Consider adding more edge case checks, such as handling empty trust lists or single-person scenarios in "Find the Town Judge".

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