In: Computer Science
1. programmers often refer to a _____ search as a "divide and conquer" procedure
a. bubble
b. binary
c. division
d. split
2. you can add an item at any point in a _______ container and the array size expands automatically to accomodate the new item
a. arraylLst
b. Array
c. ResizableArray
d. array
3.int[][] myVals = {{2,4,6,8},{20,40,60,80};
Using the above two dimensional array, what is the value of myVals[1][2]?
a. 4
b.60
c. 6
d.40
1. Binary Search
This is because it works in following manner:
this is why due to this branching in structure its said to be using divide and conquer approach
2 ArrayList in java is used as a resizable container or an dynamic array which expands on adding new element.
Note: an vector is used to do the same in C++, and list in python.
3. myVals[1][2] = 60 ,
because it refers to the second row and third column of the array.
Note: indexes always start from zero ( 0 ), so index 'i' is always 'i+1' physically. This is why i have written that it refers to second row ( by using [1] ) and third column ( by using [2] ).
Thank you.