NEW
Font size
WorksheetsCSNP-04103 - Chapter 9 - NB - Search and Sort Algorithms
Total questions: 10
Worksheet time: 5mins
Which algorithm matches this description: "a sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly selects the proper next value to move from the unsorted part to the end of the sorted part."
Selection Sort
Radix Sort
Insertion Sort
Binary Sort
Which algorithm matches the description: "is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you've narrowed down the possible locations to just one."
Linear Search
Binary Search
Bubble Search
Straight Search
Which algorithm matches the description: "is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until the list is sorted."
Selection Sort
Binary Sort
Bubble Sort
Big O()
What is the degree of complexity ( Big O() ) of the linear search algorithm?.
O(nn)
O(n log 2)
O(n2)
O(n)
What is a disadvantage of the binary search algorithm?
The elements to search needs to be sorted first.
The elements to search do not have to be sorted
Difficult to understand and implement
It uses recursion
What is the correct statement about selection sort?.
Can sort alphabetically, and numerically (ascending or descending)
Can only sort numeric (ascending or descending)
Can only sort alphabetically
None of the above
What is a disadvantage of the bubble sort algorithm?
Easy to understand and implement
It is inefficient due to the number of exchanges.
This makes it slow for large arrays
Sometimes it does not work
Elements need to be sorted in order to be used.
What is the degree of complexity ( Big O() ) for the Bubble sort algorithm?.
O(n2)
O(n)
O(2n)
O(N log 2)
The efficiency of an algorithm is measured in terms of space and time.
True
False
Analysis of an algorithm is a less effective way to find efficiencies than using empirical data
True
False
