Answer the following statements true (T) or false (F)

1. To swap the contents of two variables, a third variable must be used for temporary storage.
2. For a very large array, the fastest way to search for a value is to use the sequential search algorithm.
3. Sort algorithms can only be used on arrays that hold numeric values.
4. In a binary search of an array with 1,000 elements, if the search fails to find the item on the first attempt, then there are 999 elements left to search.

1. TRUE
2. FALSE
3. FALSE
4. FALSE

Computer Science & Information Technology

You might also like to view...

Which of the following is not an error?

a) having a function definition that spans two files b) using a global variable in a file it was not defined in without defining it with the extern modifier c) defining a function prototype without the extern keyword when the definition is in another file d) having global variables in different files with the same name

Computer Science & Information Technology

Identify some of the methods in the java.util.List interface that support an indexed list.

What will be an ideal response?

Computer Science & Information Technology