The code below is a partial copy of ScoreAnalyzer.cpp, which…
The code below is a partial copy of ScoreAnalyzer.cpp, which was posted on December 1st, 2025. In the text box below, rewrite the main() function only. Rewrite the main() function in ScoreAnalyzer.cpp without mistakes for 10 points, or rewrite the main() function, replacing the // Variable declaration statements and // Program processing statements comments with the code you wrote in response to the list of modifications in the December 1st, 2025 announcement. #include #include using namespace std;void selectionSort(int[], int);int main(){ // Variable declaration statements cout > numScores; int *scores = new int[numScores]; // create the array // Program processing statements delete[] scores; // return the storage to the heap return 0;}void selectionSort(int num[], int numel){ int i, j, min, minidx, temp; for (i = 0; i < (numel - 1); i++) { min = num[i]; // assume minimum is the first array element minidx = i; // index of minimum element for (j = i + 1; j < numel; j++) { if (num[j] < min) // if you've located a lower value { // capture it min = num[j]; minidx = j; } } if (min < num[i]) // check whether you have a new minimum { // and if you do, swap values temp = num[i]; num[i] = min; num[minidx] = temp; } }}
Read DetailsCDN The context for this question is the same as the previou…
CDN The context for this question is the same as the previous question. [9 points] In the following problem, assume that: Put(x, y) denotes putting the key-value pair (key = x and value = y) Get(x) denotes getting the value corresponding to the key = x Assume a Coral system with node-ids 1, 2, 5, 10, 20, 40, 80, 160, 200 in which the “l” value for a node is set to 1; “β” is infinite. For simplicity, assume that all puts/gets in this problem using key-based routing go through node-ids: 20, 40, 80, 160, 200 irrespective of the source node of the request. Bob just created a new video featuring him playing the drums. He wants to use Coral CDN to share it with his buddies. 3. [2 points] Diana hears about Bob’s popular video and wants to see it. She issues the command Get(200) from her node (whose node-id is 10). What value(s) will she get back? Explain your answer.
Read Details