need code in python 100 3. Disk Space Analysis A company is performing an analysis on the
Fantastic news! We've Found the answer you've been seeking!
Question:
need code in python
Transcribed Image Text:
100 3. Disk Space Analysis A company is performing an analysis on the computers at its main office. The computers are spaced along a single row. The analysis is performed in the following way: 1. Choose a contiguous segment of a certain number of computers, starting from the beginning of the row. 2. Analyze the available hard disk space on each of the computers. 3. Determine the minimum available disk space within this segment. After performing these steps for the first segment, it is then repeated for the next segment, continuing this procedure until the end of the row (i.e. if the segment size is 4, computers 1 to 4 would be analyzed, then 2 to 5, etc.) Given. this analysis procedure, find the maximum available disk. space among all the minima that are found during the analysis. Example n = 3, the number of computers space = [8, 2, 4] x = 2, the length of analysis segments In this array of computers, the subarrays of size 2 are [8, 2] and [2, 4]. Thus, the initial analysis returns 2 and 2 because those are the minima for the segments. Finally, the maximum of these values is 2. Therefore, the answer is 2. Function Description Complete the function segment in the editor below. segment has the following parameter(s): int x: the segment length to analyze int space[n]: the available hard disk space on each of the computers Returns: int: the maximum of the minimum values of available Te 100 3. Disk Space Analysis A company is performing an analysis on the computers at its main office. The computers are spaced along a single row. The analysis is performed in the following way: 1. Choose a contiguous segment of a certain number of computers, starting from the beginning of the row. 2. Analyze the available hard disk space on each of the computers. 3. Determine the minimum available disk space within this segment. After performing these steps for the first segment, it is then repeated for the next segment, continuing this procedure until the end of the row (i.e. if the segment size is 4, computers 1 to 4 would be analyzed, then 2 to 5, etc.) Given. this analysis procedure, find the maximum available disk. space among all the minima that are found during the analysis. Example n = 3, the number of computers space = [8, 2, 4] x = 2, the length of analysis segments In this array of computers, the subarrays of size 2 are [8, 2] and [2, 4]. Thus, the initial analysis returns 2 and 2 because those are the minima for the segments. Finally, the maximum of these values is 2. Therefore, the answer is 2. Function Description Complete the function segment in the editor below. segment has the following parameter(s): int x: the segment length to analyze int space[n]: the available hard disk space on each of the computers Returns: int: the maximum of the minimum values of available Te
Expert Answer:
Answer rating: 100% (QA)
Python Code I have added comments in the code for better understanding of the program func... View the full answer
Related Book For
Introduction to Operations Research
ISBN: 978-1259162985
10th edition
Authors: Frederick S. Hillier, Gerald J. Lieberman
Posted Date:
Students also viewed these programming questions
-
In the geothermal power plant that produces 12000 kW of energy, the generator inlet pressure is 2.250 kpa and the temperature is 120 degrees Celsius, the generator output is 1.26 kpa and the...
-
2 Evaluate the following integral i cos [2(t+2)]8(2T+4)dt A. 2 B. 0.1 C. 0.5 D. 1 E. None of the given answers.
-
Write Python code to implement the City Council management system. The program should do the following: Deliverables for this assignment are: 1. For the management system allocated to you, develop...
-
Knoko Systems is considering a capital budgeting project with a life of five years that requires an outlay of $90,000. It has free cash flows each period as shown in the following distribution:...
-
The Great Outdoors Clothing Company, a mail-order catalogue operation, contracts with the Federal Parcel Service to deliver all of its orders to customers. As such, Great Outdoors considers Federal...
-
When would you choose to use containers in Windows and when would you choose to use containers in Linux? How are they different? How are they similar?
-
The trial balance for Silver Shovels Exploration Company does not balance. The following errors were detected: a. The cash balance is overstated by $3,000. b. Rent expense of \($390\) was erroneously...
-
Jana has a PAP with the following coverages: Liability coverages: $100,000/$300,000/$50,000 Medical payments coverage: $5,000 each person Uninsured motorists coverage: $25,000 each person Collision...
-
CASE #2: CLASSIC MODELS Name(s): Burger Dome fast-food restaurant. Burger Dome sells hamburgers, cheeseburgers, french fries, soft drinks, and milk shakes, as well as a limited number of specialty...
-
Comprehensive Problem 1 - Part 1: Taxpayer information, Form 1040, Schedules 1, 2, 3 and 4, Schedule A, and Schedule B. Noah and Joan Arc's Tax Return Note: This problem is divided into three parts....
-
Celia and Christian, who are married jointly, have one dependent and do not itemize deductions. They have taxable income of $192,000 and tax preferences of $53,000 in 2016. What is their AMT base for...
-
Show the constant growth model in the form of its expected rate of return.
-
When she was in junior high school, Elizabeth Likens started listening to classical music after she was told that studies show that students who listen to classical music get better grades. What...
-
What are the main responsibilities imposed or assumed by professional bodies?
-
What are the arguments in favour of imposing a wide liability on professionals?
-
What is the essence of causation in most professionalclient relationships?
-
Prepare a Statement of Financial Position of MNT Company for the year ended 31 st December, 2015 in a proper format from the following list of accounts: + List of Accounts Long Term Investments Land...
-
g(x) = x 5 5x 6 a. Show that g(x) = 0 has a root, , between x = 1 and x = 2. b. Show that the equation g(x) = 0 can be written as x = (px + q) 1/r , where p, q and r are integers to be found. The...
-
A certain small grocery store has a single checkout stand with a full-time cashier. Customers arrive at the stand randomly (i.e., a Poisson input process) at a mean rate of 30 per hour. When there is...
-
Reconsider Prob. 20.3-1. Suppose now that you want to convert these random integer numbers to (approximate) uniform random numbers. For each of the three parts, give a formula for this conversion...
-
Suppose that the air freight charge per ton between seven particular locations is given by the following table (except where no direct air freight service is available): A certain corporation must...
-
Winfred Metal Reclamation Ltd, a small company, buys scrap metal residues from local companies and treats the residues to recover the metal which is then sold to other local companies. The company is...
-
What financial statements must be prepared?
-
Mainbrace Ltd is a book publisher and retailer which trades via the Internet. The company was formed using a kit bought from a legal stationer, start up capital was provided by the major shareholder,...
Study smarter with the SolutionInn App