Represent in a binary search algorithm

Question # 00767664 Posted By: Christopher3456 Updated on: 06/25/2020 04:55 PM Due on: 07/01/2020
Subject Computer Science Topic Algorithms Tutorials:
Dot Image


Question 1

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

  1. Subscript of the midpoint
  2. Middle value in the array
  3. Middle value in the portion to be searched
  4. The average of two values
  5. None of these

Question 2

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.

  1. Bubble
  2. Selection
  3. Insertion
  4. Hash
  5. None of these

Question 3Which sorting algorithm moves elements to their final sorted position in the array?

  1. Bubble
  2. Selection
  3. Insertion
  4. Hash
  5. None of these

Question 4

Which statement is true after the execution of the following statements?

  1. x and y contain their original values
  2. x and y swapped their values
  3. x contains the value in y and y stayed the same
  4. y contains the value in x and x stayed the same
  5. None of these

Question 5

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

  1. Sequential
  2. Binary
  3. Parallel
  4. Linear
  5. None of these

Question 6

  1. To order an array of strings in alphabetic order, the sorting algorithm should be structured for ________ orde
  2. alphabetic
  3. numeric
  4. ascending
  5. descending
  6. None of these

Question 7

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

  1. minIndex
  2. minValue
  3. startScan
  4. SIZE
  5. None of these

Question 8

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

  1. Ascending
  2. Descending
  3. Numeric
  4. Alphabetic
  5. None of these

Question 9

Which searching algorithm requires the array to be ordered?


Dot Image

Click chat on right side to get answer. Click on Chat
Whatsapp Lisa