Spring Hire Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
08
:
04
:
54
:
34
Back to Dashboard
[CodeSignal] Synchronized Pipeline Delays
Hard
A hierarchical data pipeline consists of n broadcast stages, numbered 1 to n, arranged in a perfect binary tree rooted at stage 0. Each stage i (for i from 1 to n-1) has a propagation delay to its parent, given by propagation[i-1] (0-indexed).
You want all root-to-leaf propagation paths to have the same total delay. You may only increase individual edge delays -- you may never decrease them. ...