You are given an integer n representing the number of nodes in a directed graph, labeled from n threshold. You are also given a edges, where edges[i]
Your task is to select a subset of edges such that:
Node
The out-degree of every node in the selected set of edges is at most threshold.
The maximum weight among all selected edges is minimized.
Return the minimum possible value of the maximum edge weight among the chosen edges. If it is impossible to satisfy these conditions, return
Constraints:
n
threshold n
edges.length
edges[i].length
n
There may be multiple edges between a pair of nodes, but they must have unique weights.
You are given an integer n representing the number of nodes in a directed graph, labeled from n threshold. You are also given a edges, where edges[i]
Your task is to select a subset of edges such that:
Node
The out-degree of every node in the selected set of edges is at most threshold.
The maximum weight among all selected edges is minimized.
Return the minimum possible value of the maximum edge weight among the chosen edges. If it is impossible to satisfy these conditions, return
Constraints:
n
threshold n
edges.length
edges[i].length
n
There may be multiple edges between a pair of nodes, but they must have unique weights.