Question 1 (1 point) Only put in the integer for the index, not the value of the
ID: 3869274 • Letter: Q
Question
Question 1 (1 point) Only put in the integer for the index, not the value of the array. 0510 152025 3035404550 5550 Save Question 2 (1 point) What is the index of the second element accessed in the array when searching for the number 12? Only put in the integer for the index, not the value of the array 0510 15202530354045505550 Save Question 3 (1 point) What is the index of the third element accessed in the array when searching for the number 12? Only put in the integer for the index, not the value of the array. 0510 152025 303504550 5550Explanation / Answer
In binary search for finding an element first the value will be compared with the with the middle value of array and if te value compared is than the value present in the array , then the value will be compared with the middle of subarray from 0 to middleindex of original minus 1, otherwise the value will be compared with the middle of subarray from middleindex of original plus 1 to end of original array.
Based on the above explantion below are the answers for the asked questions:-
Question 1) 7
Question 2) 3
Question 3) 1
Question 4) 2
Question 5) one