Amazonjuniornov. de 2024
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.
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.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
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.
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.