Question: Using Binary Search, which elements in the following array are compared to the target when target = 50? 12,23,34,42,55,61,78,80,85,93,97,99 Group of answer choices 5, 2,
- Using Binary Search, which elements in the following array are compared to the target when target = 50?
12,23,34,42,55,61,78,80,85,93,97,99
Group of answer choices
5, 2, 3, 4
61, 34, 55, 42
78, 42, 61, 55
61, 34, 42, 55
5, 2, 4, 3
Which one of the following calls for the binary search algorithm is correct?
int binSearch( const int list[], int size, int target);
int main()
{
int a[] = {10, 20, 30, 40, 50, 60, 70, 80};
int size = 8, target = 65, pos;
// calling statement for biSearch
return 0;
}
a. binSearch(a, size, target);
pos = binSearch( const int list[], int size, int target);
pos = binSearch(a, 8);
pos = binSearch(a, size, target);
pos = binSearch( a, target, size);
- After 5 passes of the Insertion Sort Algorithm, an array contains the elements shown below. Show the contents of the array after one more pass of the Insertion Sort algorithm:
12,23,34,42,55,61,18,10,25
Group of answer choices
The array does not change
10, 12, 23, 34, 42, 55, 61, 18, 25
12, 18, 23, 34, 42, 55, 61, 10, 25
10, 12, 18, 23, 25, 34, 42, 55, 61
- 12, 23, 25, 34, 42, 55, 61, 18, 10
Using Binary Search, which elements in the following array are compared to the target when target = 50?
12,23,34,42,55,61,78,80,85,93,97,99
Group of answer choices
5, 2, 3, 4
61, 34, 55, 42
78, 42, 61, 55
61, 34, 42, 55
5, 2, 4, 3
After 5 passes of the Insertion Sort Algorithm, an array contains the elements shown below. Show the contents of the array after one more pass of the Insertion Sort algorithm:
12,23,34,42,55,61,18,10,25
Group of answer choices
The array does not change
10, 12, 23, 34, 42, 55, 61, 18, 25
12, 18, 23, 34, 42, 55, 61, 10, 25
10, 12, 18, 23, 25, 34, 42, 55, 61
12, 23, 25, 34, 42, 55, 61, 18, 10
Which one of the following calls for the insertion sort algorithm is correct?
void sort( int list[], int size);
int main()
{
int a[] = {10, 90, 30, 50, 20, 70, 30};
int size = 7;
// calling statement for sort:
return 0;
}
Group of answer choices
sort(a, 7);
sort list[], size);
sort( int a[], int size);
sort(a[], size);
sort( int list[], int size);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
