GoConqr has a new look! Let us know what you think.

Flashcards

Chapter 9 (Sorting and Searching Arrays)

Deleted user User has deleted their subject information English 14 cards

Cards in this deck (14)

  1. 1This type of algorithm rearranges the values stored in an array in some particular order.Sorting Algorithm
  2. 2If an array is sorted in this order, the values are stored from lowest to highest.Ascending Order
  3. 3If an array is sorted in this order, the values are stored from highest to lowest.Descending Order
  4. 4This algorithm makes several passes through an array and causes the larger values to gradually move or "bubble" toward the end of the array with each pass.Bubble Sort Algorithm
  5. 5In this algorithm, the smallest value in the array is located and moved to the element 0. Then the next smallest value is located and moved to element 1. This process continues until all of the elements have been placed in their proper order.Selection Sort Algorithm
  6. 6This algorithm sorts the first two elements which become the sorted part of the array. Then it inserts each of the remaining elements, one at a time, into the sorted part of the array at the correct location.Insertion Sort Algorithm
  7. 7This search algorithm steps sequentially through an array, comparing each item with the search value. Best used for small array and not large ones.Sequential Search Algorithm
  8. 8This search algorithm repeatedly divides the portion of an array being searched in half. Each time it divides the array, it eliminates the half of the array that doesn't contain the item. Requires that all values in the array are in ascending order.Binary Search Algorithm
  9. 9Between binary search and sequential search, which is more efficient.Binary Search
  10. 10True/False: Regardless of the programming language being used, it is not possible to use the bubble sort algorithm to sort strings.False: Bubble Sort, Selection Sort, and Insertion Sort are all capable to reorder strings.
  11. 11True/False: The "average" number of comparisons performed by the sequential search algorithm on an array of "n" elements is "n/2" (assuming the search values are consistently found).True
  12. 12True/False: The "maximum" number of comparisons performed by the sequential search algorithm on an array of "n" elements is "n/2" (assuming the search values are consistently found).False: It is possible to go through all the values of an array which means the maximum is "n" and not "n/2".
  13. 13True/False: To successfully swap the contents of two variables, we need to declare a third variable that can serve as a temporary storage location.True
  14. 14Assuming a temporary variable was made for the swap function, what are the following steps to swap the two values of variables "a" and "b"?- Assign the value of "a" to "temp".
    -Assign the value of "a" to "b".
    - Assign the value of "temp" to "b".

Information

Description
User has deleted their subject information Flashcards on Chapter 9 (Sorting and Searching Arrays), created by Deleted user on 12/01/2021.
Created by
Deleted user
Views
16
History
  • Created by Andrew Lewis · Dec 14, 2020
  • Copied by Andrew Lewis · Jan 12, 2021
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?