数据库Java工程师单选难度 3真题改编
455. 假设有必修课成绩表course,每位学生的期末考试成绩以及补考成绩都录入到course表中,学号为20190001的同学想查询一下自己未通过的课程的课程编号与课程名称,那么下面正确的sql语句是 create table `course`(
`id` int(11) not null auto_increment,
`sid` int(11) not null comment '学号',
`cid` int(11) not null comment '课程编号',
`cname` char(50) not null comment '课程名称',
`score` int(11) not null comment '分数',
primary key(`id`)
)engine = innodb;
练习本题 ›
算法与数据结构递归单选难度 3真题改编 · 2023
466. 给定一组硬币面值 $C=\{1,5,10,25,60,100\}$ ,下面是用最少的硬币向客户支付金额的贪心算法,下列关于该贪心算法的叙述正确的是()
ALGORITHM (x, c1, c2, …, cn)//c1,c2..表示货币金额
SORT n coin denominations so that 0 < c1 < c2 < … < cn.
S ← ∅.//选择货币的集合
WHILE (x > 0)
k ← largest coin denomination ck such that ck <= x.
IF no such k, RETURN “no solution.”
ELSE
x ← x – ck.
S ← S ∪ { k }.
RETURN S.
练习本题 ›