Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:20, sindy35111
Terri needs to insert a cover page into her document. where should she go to access the commands to do so? o insert tab, objects group o insert tab, illustrations group o insert tab, pages group o insert tab, media group submit
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, sebcbal
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
image
Computers and Technology, 23.06.2019 15:00, victordhernandez01
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
image
Computers and Technology, 24.06.2019 10:20, savyblue1724707
Identify the publisher in this citation: carter, alan. a guide to entrepreneurship. new york: river’2008.print.
Answers: 3
Do you know the correct answer?
Disk Space Analysis A company is performing an analysis on the computers at its main office. The com...

Questions in other subjects:

Konu
Mathematics, 10.02.2021 14:00
Konu
Physics, 10.02.2021 14:00
Konu
Mathematics, 10.02.2021 14:00