subject

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, compu 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 segmentsIn this array of computers, the subarrays of size 2 are 18, 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): intx: 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 hard disk space found while analyzing the computers in segments of numcomps Constraints • 1 snc 10 • In • Is space 10 Input Format for Custom Testing Sample Case Sample Input STOIN Function1 - length of segments 1 - Size of space n = 51 - space - [1, 2, 3, 1, 2) 2 3 1 2 Sample Output 3 Explanation The subarrays of size x1 are 11.121.131.1 and (2) Because each subarray only contains / element, each value is minimal with respect to the subarray it is in. The maximum of these values is 3.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
Awide variety of “ apps “ are available to customize devices. which category of app does the word processing software fall into?
Answers: 2
question
Computers and Technology, 25.06.2019 00:30
Which of these serves as a bridge between the programming team and the audio team?
Answers: 2
question
Computers and Technology, 25.06.2019 05:30
Your mother is sure that you were driving too fast because she knows a. when you arrived and the direction you came from. b. how long it took you to get home and how far you traveled. c. what time you left and how long it took you to get home. d. the direction you were driving and how far you traveled.
Answers: 2
question
Computers and Technology, 25.06.2019 08:30
Which of the following terms is described as “the art and design of using text”? a. typography b. elements of design c. typos d. graphic design
Answers: 1
You know the right answer?
Disk Space Analysis A company is performing an analysis on the computers at its main office. The com...
Questions
question
History, 22.04.2020 04:53
Questions on the website: 13722362