1. Code Question 1 Amazon Delivery Centers dispatch parcels every day. There are \( n \) delivery centers, each having parcels[i] parcels to be delivered. On each day, an equal number of parcels are to be dispatched from each delivery center that has at least one parcel remaining. Find the minimum number of days needed to deliver all the parcels. Example parcels \( =[2,3,4,3,3] \) There are \( n=5 \) delivery centers with parcels as shown. Day T:2 parcels are delivered from each center
Day 2: 1 parcel is delivered from the remaining centers Day 3: 1 parcel is delivered from the remaining center All parcels can be delivered in a minimum of 3 days. Function Description Complete the function getMinimumDays in the editor below. getMinimumDays has the following parameters: int parcels[n]: the number of parcels at each center
center
Explanation A minimum of 3 days is required to deliver the parcels. - On the first day, 2 parcels can be delivered from each delivery center. Remaining parcels = \( [2,0,1,2] \). - On the second day, 1 parcel can be delivered from each remaining delivery center. Remaining parcels \( =[1,0,0,1] \). - On the third day, 1 parcel can be delivered from each remaining delivery center. Remaining parcels \( =[0,0,0,0] \). Sample Case 1 Sample Input For Custom Testing 3 3 3 3 Sample Output 1 Explanation Each delivery center can dispatch its 3 parcels on the first day.