The sequential search algorithm: 顺序搜索算法:
A. requires the array to be ordered 要求数组是有序的
B. must always be implemented as a method 必须始终作为一种方法来实现
C. uses a loop to sequentially step through an array, starting with the first element循环来依次遍历一个数组,从第一个元素开始
D. will not execute, if the element is not in the array 如果元素不在数组中,则不执行。
查看答案
In order to do a binary search on an array, 为了对数组进行二分查找
A. the values of the array must be numeric 数组的值必须是数值型的
B. the array must first be sorted in ascending order 数组必须先按升序排序
C. you must first do a sequential search of the array to assure the element you are looking for is there 你必须首先对数组进行顺序搜索,以确保您要查找的元素在其中 d. There are no requirements 没有要求
If numbers is a two-dimensional array, which of the following would give the length of row r? 如果numbers是一个二维数组,下面哪个选项会给出r行的长度?
A. numbers.length
B. numbers.length[r]
C. numbers[r].length[r]
D. numbers[r].length
Which of the following is a correct method header for receiving a two-dimensional array as an argument? 下列哪个是接收二维数组作为参数的正确方法头?
A. public static void passArray(int[1,2])
B. public static void passArray(int [][])
C. public static void passArray(int[1],[2])
D. public static void passArray(int[], int[])
A ragged array is: 一个不规则的数组是:
A. a two-dimensional array for which the number of rows is unknown 一个二维数组,其行数未知
B. a one-dimensional array for which the number of elements is unknown 一个元素数目未知的一维数组
C. a two-dimensional array where the rows are of different lengths 一个二维数组,其中的行具有不同的长度
D. There is no such thing as a ragged array 没有所谓的不规则数组