Highest Bandwidth Route Between Two CDN Edge Nodes
Last updated: November 29, 2026
Quick Overview
TikTok's CDN links have different capacities, and a route's usable bandwidth is the capacity of its weakest link. Given undirected links `(u, v, gbps)`, find the maximum bottleneck bandwidth achievable from a source edge node to a destination.
TikTok
November 29, 20260
0
0 solved
TikTok's CDN links have different capacities, and a route's usable bandwidth is the capacity of its weakest link. Given undirected links `(u, v, gbps)`, find the maximum bottleneck bandwidth achievable from a source edge node to a destination.
Video delivery at TikTok depends on moving large cache fills between edge and origin nodes, and this question checks whether you can adapt a shortest-path algorithm to a different path metric. The interviewer wants the modified Dijkstra (or a maximum spanning tree argument) and a clear explanation of why the greedy order is still valid.
What the Interviewer Expects
- Defines the path metric as the minimum edge on the path, maximized over paths
- Adapts Dijkstra with a max-heap and min() instead of addition
- Explains why the metric is monotone, so settling greedily is safe
- Handles stale heap entries and unreachable destinations
- Mentions the maximum spanning tree alternative
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you answer many (src, dst) queries on the same network quickly?
- Links also have latency; how would you find the lowest-latency route among those with at least 5 Gbps?
- How does the answer change if traffic can be split across several paths?
- How would you recompute when a single link fails?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Undirected graph with positive capacities. Path width = min capacity along it. Return the maximum width over all src to dst paths, 0 if unreachable, and infinity when src equals dst (no link constrain...
High-Level Design
Dijkstra works for any path metric where extending a path never improves it. Here, extending a path can only keep or lower its bottleneck, since min(width, w) <= width. So I run Dijkstra with a max-...