Answer:
By Using the Greedy- Activity- Selection algorithm
Explanation:
The Greedy- Activity- Selection algorithm in this case involves
First finding a maximum size set S1, of compatible activities from S for the first lecture hall.
Then using it again to find a maximum size set S2 of compatible activities from S - S1 for the second hall.
This is repeated till all the activities are assigned.
It requires θ(n2) time in its worse .
Answer:
Network Printer
Explanation:
A network printer is a type of printer that is accessible by network connections, making it available for use by other computers connected to that network. The network can either come from the printer or from a local computer provided to create network for the printer. Most of them contains a network interface card that allow them connect directly to a local network from which computers can then access them. This is different from a local printer that is directly connect to the computer via USB cable.
Network printer is very advantageous in that multiple network computers can access the printer at thesame time.
Answer:
The value of myArray2[index2] when index1 = 12 is 30
Explanation:
In the source code, the formula for myArray2[index2] is;
myArray2[index2] = index2 + index3 + myArray1[index1],
myArray1[index1] = index1 * 2,
index2 = index % 10 (equal to the remainder) and
index3 = index % 8
When index1 increases to 12 in the for-loop statement, the "myArray1[index1]" is equal to 24, index2 is equal to 2 and index3 is 4. The total sum is equal to 30 and assigned to "myArray2[index2]".