Available question text
Given an undirected weighted graph where some edges have weight -1 (modifiable) and others are fixed, assign positive integer weights (in [1, 2e9]) to the -1 edges so that the shortest-path distance from source to destination equals a given target, or report impossibility. The core challenge is finding weight assignments that exactly match the target shortest-path length while respecting the fixed edges and shortest-path structure.
Related questions
Continue with questions that share topics or the same question type.
- Maximize Sum of Weights after Edge Removals
Coding · Depth-First Search · Dynamic Programming · Sorting
- Maximum Sum of Edge Values in a Graph
Coding
- Minimize the Maximum Edge Weight of Graph
Coding
- Number of Ways to Assign Edge Weights I
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2699. Modify Graph Edge Weights
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source