Exam 9: Sorting and Searching Arrays

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

In a binary search,if the search fails to find the item on the first attempt,then there are 999 elements left to search in an array of 1000 elements.

(True/False)
5.0/5
(41)

In the bubble sort algorithm,the two arguments sent into the swap module are ___________.

(Multiple Choice)
4.9/5
(32)

Which searching algorithm requires the array to be ordered?

(Multiple Choice)
4.8/5
(42)

What does the variable middle represent in a binary search algorithm?

(Multiple Choice)
4.9/5
(33)

In a selection sort,which variable holds the subscript of the element with the smallest value found in the scanned area of the array?

(Multiple Choice)
4.8/5
(35)

To order an array of strings in alphabetic order,the sorting algorithm should be structured for ____________ order.

(Multiple Choice)
4.9/5
(33)

When the elements in an array are stored from lowest to highest,the array is sorted in __________ order.

(Multiple Choice)
4.9/5
(36)

In a selection sort algorithm,the variable minValue holds the smallest value found in the scanned area of the array.

(True/False)
4.8/5
(38)

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

(Multiple Choice)
4.8/5
(28)

The bubble sort is limited to arranging data only in acceding order.

(Short Answer)
4.7/5
(45)

The sequential search algorithm is simple and most efficient to use with a large data array.

(True/False)
4.9/5
(41)

In a selection sort,the minValue is set to element _____ in the first iteration of the outer loop.

(Short Answer)
4.8/5
(38)

In a selection sort,the first step is to move the smallest value in the array to element _______,in order to sort the array in ascending order.

(Short Answer)
4.9/5
(37)

All sorting algorithms contain a group of statements that swap values in array elements.

(True/False)
5.0/5
(32)

The data in an array can be sorted in either ascending or descending order.

(True/False)
4.8/5
(39)

In the bubble sort algorithm,the movement of the sorted values is commonly described as seeming to __________ toward the end of the array.

(Short Answer)
4.8/5
(36)

In the swap module,the third variable is declared as a __________ variable.

(Multiple Choice)
4.8/5
(41)

The biggest advantage of the bubble sort algorithm is that values move only by one element at a time toward their final destination in the array.

(True/False)
4.8/5
(29)

If the values in an array are sorted in ___________ order,then they are stored from highest to lowest.

(Short Answer)
4.7/5
(33)

Which search algorithm uses three variables to mark positions within the array as it searches for the searchValue?

(Multiple Choice)
4.9/5
(31)
Showing 21 - 40 of 43
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)