Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2374. Node With Highest Edge Score
Given a directed functional graph (each node has exactly one outgoing edge via edges[i]), compute each node's "edge score" as the sum of labels of nodes that point to it and return the node with the highest score, breaking ties by smallest index. Constraint: n up to 1e5.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid November, 2024
Amazon
Junior
Directed Graph Edge Score: Find the node with the highest edge score in a directed graph. If there's a tie, return the smallest indexed node.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.