Exam 9: Sorting and Searching Arrays
Exam 1: Introduction to Computers and Programming48 Questions
Exam 2: Input, processing, and Output48 Questions
Exam 3: Modules48 Questions
Exam 4: Decision Structures and Boolean Logic44 Questions
Exam 5: Repetition Structures44 Questions
Exam 6: Functions44 Questions
Exam 7: Input Validation44 Questions
Exam 8: Arrays46 Questions
Exam 9: Sorting and Searching Arrays43 Questions
Exam 10: Files43 Questions
Exam 11: Menu-Driven Programs43 Questions
Exam 12: Text Processing31 Questions
Exam 13: Recursion43 Questions
Exam 14: Object-Oriented Programming43 Questions
Exam 15: Gui Applications and Event-Driven Programming43 Questions
Select questions type
Which of the following sorting algorithms is the least efficient?
Free
(Multiple Choice)
4.8/5
(24)
Correct Answer:
A
For an array of n items,the average number of comparisons in a sequential search is _______.
Free
(Short Answer)
4.9/5
(40)
Correct Answer:
n/2
In the bubble sort algorithm,the maxElement variable will hold the _______ of the last element that is to be compared to its immediate neighbor.
Free
(Short Answer)
4.8/5
(42)
Correct Answer:
subscript
Swapping the contents of two variables requires a third variable that can serve as a temporary storage location.
(True/False)
4.8/5
(29)
Which statement is true after the execution of the following statements?
Set t = x
Set x = y
Set y = t
(Multiple Choice)
4.8/5
(35)
Which sorting algorithm moves elements to their final sorted position in the array?
(Multiple Choice)
4.9/5
(37)
Which of the following search algorithms should be used on large arrays if speed is important?
(Multiple Choice)
4.7/5
(37)
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.
(True/False)
4.7/5
(33)
In a sorting algorithm,the sort order can be changed by changing the ________________ operator.
(Short Answer)
4.8/5
(29)
In a binary search,what is the maximum number of comparisons that need to be performed if the array contained 1000 elements?
(Multiple Choice)
4.9/5
(36)
When placing the elements in an array in descending order,the __________ sort begins by finding and placing the largest value in element 0.
(Short Answer)
4.9/5
(28)
When using a module to swap the values in two variables,the arguments must be passed into __________ parameters in the module.
(Short Answer)
4.8/5
(41)
Which sorting algorithm sorts the first two elements of an array before inserting the remaining elements into that sorted part of the array?
(Multiple Choice)
4.8/5
(40)
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.
(True/False)
4.7/5
(34)
The _________ search algorithm locates an item in an array by repeatedly dividing the array in half.
(Short Answer)
5.0/5
(34)
For an array of n items,the maximum number of comparisons in a sequential search is ______.
(Short Answer)
4.8/5
(39)
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.
(Multiple Choice)
4.9/5
(38)
Computer programming languages are only able to perform sort algorithms on numeric arrays.
(True/False)
4.9/5
(30)
Showing 1 - 20 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)