数据库单选难度 3真题改编 · 2023
3551. Mysql中表student_table(id,name,birth,sex),插入如下记录:
('1004' , '张三' , '2000-08-06' , '男');
('1005' , NULL , '2001-12-01' , '女');
('1006' , '张三' , '2000-08-06' , '女');
('1007' , ‘王五’ , '2001-12-01' , '男');
('1008' , '李四' , NULL, '女');
('1009' , '李四' , NULL, '男');
('1010' , '李四' , '2001-12-01', '女');
执行
select count(t1.birth) as c1
from (
select * from student_table where sex = '男' ) t1
right join
(select * from student_table where sex = '女') t2
on t1.birth = t2.birth and t1.name = t2.name ;
的结果行数是()?
练习本题 ›
编程语言单选难度 3真题改编 · 2024
3569. 实现一个函数,将两个有序整数数组合并为一个有序数组,并返回新的数组 public class MergeArrays {
public static int[] merge(int[] arr1, int[] arr2) {
int[] result = new int[arr1.length + arr2.length];
int i = 0, j = 0, k = 0;
while (i < arr1.length && j < arr2.length) {
if (____) { // 填空
result[k++] = arr1[i++];
} else {
result[k++] = arr2[j++];
}
}
while (i < arr1.length) {
result[k++] = arr1[i++];
}
while (j < arr2.length) {
result[k++] = arr2[j++];
}
return result;
}
public static void main(String[] args) {
int[] arr1 = {1, 3, 5};
int[] arr2 = {2, 4, 6};
int[] merged = merge(arr1, arr2);
System.out.println(Arrays.toString(merged));
}
}
填空内容是:
练习本题 ›