BackmediumUncategorized uncategorized medium

Minimum Routing Delay Solution

Problem Statement

Given an array of message intervals and an array of node delays, determine the most efficient routing to minimize the total delay.

Example 1
Input
[[1, 5], [2, 4], [3, 6], [7, 3], [1, 2]]
Output
3

Explanation: The optimal routing has delays 2, 3, and 1 respectively.

Constraints

  • 1 ≤ nodes.length ≤ 10^5
  • 1 ≤ nodes[i][0] ≤ 10^6
  • 1 ≤ delay[i] ≤ 10^9
  • Messages may overlap
Live Compiler
Loading...
Test Cases & Output
🔒 Sign up to run your code

🚀 Practice this problem

Run code, get AI hints & track streak

Sign Up Free