Question: -Queuing for Water Algorithm Design and Analysis Using Dev-C++ Requirements: There are n people queuing for water from r taps. The filling the bucket time

Algorithm Design and Analysis
Using Dev-C++
Requirements: There are n people queuing for water from r taps. The filling the bucket time is t1,t2,,tn. They were integers and not equal. How should they arrange their water fetching order to minimize their total time? Input: Linel, enter the number of people n and the number of taps r. Line2, enter the time t for each person to fetch water. Output: Minimum total spent time. Note: The STL library cannot be used for sorting in this code. You must design your own code to sort by bubble method. 4 Operation effect: input number of people n and number of faucets r : 52 input the time t for each person to fetch water: 93726 The total time for fetching water is: 40
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
