Google Screening Round | Interview Question

Given number of bytes you need to send accross the network in packets. The max capacity of each package is given. You need to calculate the min capacity that should be send accross the network and also minimize the no. of packets as well.

Input: [number of bytes, max_capacity]
Output: [numbe of packets, max_capacity_in_packets]

Input: [1000, 10]
Output : [10, 10]

Input: [11, 10]
Output: [2, 6]
Explanation: Packets: [6,5]

Input: [24, 5]
Output: [5, 5]

Comments (2)