Answer:
Option a. int max = aList.get(0); for (int count = 1; count < aList.size(); count++) { if (aList.get(count) > max) { max = aList.get(count); } }
is the correct code snippet.
Explanation:
Following is given the explanation for the code snippet to find largest value in an integer array list aList.
- From the array list aList, very first element having index 0 will be stored in the variable max (having data type int).
- By using for starting from count =1 to count = size of array (aList), we will compare each element of the array with first element of the array.
- If any of the checked element get greater from the first element, it gets replaced in the variable max and the count is increased by 1 so that the next element may be checked.
- When the loop will end, the variable max will have the greatest value from the array aList.
i hope it will help you!
Answer:
If this is actually college then thats weird cuz im in middle school and im doing this stuff. And the answer is wireless networks
Explanation:
Answer:
Preemptive scheduling is the scheduling which a process given to the CPU can be suspended if a more suitable process comes between execution.
For example :- In SJF (Shortest Job First) a more smaller process comes between the execution the CPU will execute the new process and the process which was in the execution will be suspended for the time being.
Non-Preemptive scheduling cannot suspend the process in between if a process is in execution it will be fully executed then other process will get executed.
Strict Non preemptive scheduling are not suitable for computer centers because it cannot execute process with more priority if it comes between the execution.