Skip to content

Completed Graph-1 - #801

Open
ManasviReddy25 wants to merge 1 commit into
super30admin:masterfrom
ManasviReddy25:master
Open

ManasviReddy25 wants to merge 1 commit into
super30admin:masterfrom
ManasviReddy25:master

Conversation

@ManasviReddy25

Copy link
Copy Markdown

No description provided.

@super30admin

Copy link
Copy Markdown
Owner

Find the Town Judge (Problem1.py)

Strengths:

  1. Correct algorithm: You correctly identified and implemented the optimal indegree-based approach
  2. Good documentation: Excellent comments explaining the approach, time/space complexity, and the reasoning behind each operation
  3. Clean code: The solution is readable and well-structured
  4. Optimal complexity: Both time and space complexity match the reference solution

Areas for minor improvement:

  1. Pythonic iteration: Instead of for i in trust: indegrees[i[0]] -= 1; indegrees[i[1]] += 1, you could use tuple unpacking for cleaner code: for a, b in trust: indegrees[a] -= 1; indegrees[b] += 1
  2. Variable naming: Using i for both the trust pair and the person index could be slightly confusing. Consider using different variable names like pair or a, b for the trust iteration

VERDICT: PASS


The Maze (Problem2.py)

[Constructive feedback for the answer]

VERDICT: NEEDS_IMPROVEMENT

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.

3 participants