Solved

Suppose You Wanted to Test Your Sort on an Array

Question 103

Multiple Choice

Suppose you wanted to test your sort on an array filled with different elements each time the code is run. What is an efficient technique for creating an array of 1,000 elements for each run?


A) Run the program many times, entering different values for the array elements.
B) Make a file with many sets of values and loop through them, sorting each one.
C) Use the Random class to generate array elements, sorting each set in a loop.
D) Create many different arrays with different elements in the program code and sort each array.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions