Answer:
Time Complexity of Problem - O(n)
Explanation:
When n= 1024 time taken is t. on a particular computer.
When computer is 8 times faster in same time t , n can be equal to 8192. It means on increasing processing speed input grows linearly.
When computer is 8 times slow then with same time t , n will be 128 which is (1/8)th time 1024.
It means with increase in processing speed by x factor time taken will decrease by (1/x) factor. Or input size can be increased by x times. This signifies that time taken by program grows linearly with input size n. Therefore time complexity of problem will be O(n).
If we double the speed of original machine then we can solve problems of size 2n in time t.
Answer:
Options A and C.
Explanation:
In Oracle Cloud Infrastructure the two options which allows you to increase disk performance are;
1. Terminate the compute instance preserving the boot volume. Create a new compute instance using a VM Dense IO shape using the boot volume preserved.
2. Create a backup of the boot volume. Create a new compute instance a VM Dense IO shape and restore the backup.
Explanation:
Let, DG is the datagram so, DG= 2400.
Let, FV is the Value of Fragment and F is the Flag and FO is the Fragmentation Offset.
Let, M is the MTU so, M=700.
Let, IP is the IP header so, IP= 20.
Let, id is the identification number so, id=422
Required numbers of the fragment = ![[\frac{DG-IP}{M-IP} ]](https://tex.z-dn.net/?f=%5B%5Cfrac%7BDG-IP%7D%7BM-IP%7D%20%5D)
Insert values in the formula = ![[\frac{2400-20}{700-20} ]](https://tex.z-dn.net/?f=%5B%5Cfrac%7B2400-20%7D%7B700-20%7D%20%5D)
Then, =
= ![[3.5]](https://tex.z-dn.net/?f=%5B3.5%5D)
The generated numbers of the fragment is 4
- If FV = 1 then, bytes in data field of DG=
and id=422 and FO=0 and F=1.
- If FV = 2 then, bytes in data field of DG=
and id=422 and FO=85
and F=1.
- If FV = 3 then, bytes in data field of DG=
and id=422 and FO=170
and F=1.
- If FV = 4 then, bytes in data field of DG=
and id=422 and FO=255
and F=0.
#include <iostream>
using namespace std;
int main() {
const int SCORES_SIZE = 4;
int oldScores[SCORES_SIZE];
int newScores[SCORES_SIZE];
int i = 0;
oldScores[0] = 10;
oldScores[1] = 20;
oldScores[2] = 30;
oldScores[3] = 40;
/* Your solution goes here */
for (i = 0; i < SCORES_SIZE; ++i) {
cout << newScores[i] <<" ";
}
cout << endl;
return 0;
}