Filters
Question type

Study Flashcards

When values in an array need to be swapped,the array and the size of the array have to be sent to the swap module.

Correct Answer

verifed

verified

Which sorting algorithm moves elements to their final sorted position in the array?


A) Bubble
B) Selection
C) Insertion
D) Hash
E) None of the above

Correct Answer

verifed

verified

The advantage of the _________ search is its simplicity.

Correct Answer

verifed

verified

For an array of n items,the average number of comparisons in a sequential search is _______.

Correct Answer

verifed

verified

n/2

Which statement is true after the execution of the following statements? Set t = x Set x = y Set y = t


A) x and y contain their original values
B) x and y swapped their values
C) x contains the value in y and y stayed the same
D) y contains the value in x and x stayed the same
E) None of the above

Correct Answer

verifed

verified

Which of the following search algorithms should be used on large arrays if speed is important?


A) Binary
B) Sequential
C) Bubble
D) Selection
E) Insertion

Correct Answer

verifed

verified

When using a module to swap the values in two variables,the arguments must be passed into __________ parameters in the module.

Correct Answer

verifed

verified

Computer programming languages are only able to perform sort algorithms on numeric arrays.

Correct Answer

verifed

verified

Which of the following sorting algorithms is the least efficient?


A) Bubble sort
B) Insertion sort
C) Selection sort
D) All of the above
E) None of the above

Correct Answer

verifed

verified

A

Which of the following is a sorting algorithm?


A) Bubble sort
B) Selection sort
C) Insertion sort
D) All of the above
E) None of the above

Correct Answer

verifed

verified

For an array of n items,the maximum number of comparisons in a sequential search is ______.

Correct Answer

verifed

verified

In the bubble sort algorithm,the maxElement variable will hold the _______ of the last element that is to be compared to its immediate neighbor.

Correct Answer

verifed

verified

subscript

Swapping the contents of two variables requires a third variable that can serve as a temporary storage location.

Correct Answer

verifed

verified

In a sequential search,each element is compared to the searchValue and the search stops when the value is found or the end of the array is encountered.

Correct Answer

verifed

verified

In a sorting algorithm,the sort order can be changed by changing the ________________ operator.

Correct Answer

verifed

verified

When placing the elements in an array in descending order,the __________ sort begins by finding and placing the largest value in element 0.

Correct Answer

verifed

verified

In a binary search,what is the maximum number of comparisons that need to be performed if the array contained 1000 elements?


A) 1000
B) 500
C) 250
D) 100
E) None of the above

Correct Answer

verifed

verified

Which sorting algorithm sorts the first two elements of an array before inserting the remaining elements into that sorted part of the array?


A) Bubble
B) Selection
C) Insertion
D) Hash
E) None of the above

Correct Answer

verifed

verified

The _________ search algorithm locates an item in an array by repeatedly dividing the array in half.

Correct Answer

verifed

verified

As the __________sorting algorithm makes passes through and compares the elements of the array,certain values move toward the end of the array with each pass.


A) Bubble
B) Selection
C) Insertion
D) Hash
E) None of the above

Correct Answer

verifed

verified

Showing 1 - 20 of 43

Related Exams

Show Answer