O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Chapter 9 (Sorting and Searching Arrays)

Usuário eliminado O usuário eliminou as informações de disciplina Inglês 14 flashcards

Flashcards do conjunto (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".

Informações

Descrição
O usuário eliminou as informações de disciplina FlashCards sobre Chapter 9 (Sorting and Searching Arrays), criado por Usuário eliminado em 12-01-2021.
Criado por
Usuário eliminado
Visualizações
16
Histórico
  • Criado por Andrew Lewis · 14 dez 2020
  • Copiado por Andrew Lewis · 12 jan 2021
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?