Skip to content
DeepForgeby svx
All problems
EasyDeep Learningdl-431

Collective Bandwidth Time

Problem

Compute the minimum time in milliseconds to move bytes_moved over a link of bandwidth_gbps gigabytes per second: bytes_moved / (bandwidth_gbps * 1e6).

The signature is collective_bandwidth_time(bytes_moved, bandwidth_gbps). Return a float number of milliseconds.

Hint

One gigabyte per second moves 1e6 bytes per millisecond.

Test cases

case 1
in: [1000000000,100]
expected: 10
case 2
in: [500000000,50]
expected: 10
case 3
in: [0,200]
expected: 0
case 4
in: [1000000,10]
expected: 0.1
Starter codePython
def collective_bandwidth_time(bytes_moved, bandwidth_gbps):
    # Your code here
    pass

4 test cases · run your code against them in the editor