← 返回 google 的题目列表Optimal File Distribution in a Data Center
类型:online_judge
google
In a data center, there is a system consisting of multiple clusters which are connected to a central switch in a star topology. Assume each wire has the same bandwidth. Design an algorithm to distribute a file to all machines as quickly as possible.
Requirements:
Fully utilize all wire bandwidth.
Consider multiple concurrent transmissions.
Provide fault tolerance to handle network failures.
Output the pseudocode of the algorithm and analyze its time complexity in the worst case.
Example:
Assume there are 4 clusters:
Input: Number of machines = 4, Bandwidth = 100
Output: Pseudocode and Time Complexity Analysis
Test Cases:
Input: Number of machines = 5, Bandwidth = 100 Output:
Pseudocode
Time and Space Complexity Analysis
Input: Number of machines = 100, Bandwidth = 1000 Output:
Pseudocode
Time and Space Complexity Analysis
Example
Input
100
4
100