Jqiwen
Jqiwen
全部文章
分类
题解(10)
归档
标签
去牛客网
登录
/
注册
Jqiwen的博客
全部文章
(共9篇)
题解 | #查找山东大学男生的GPA#
结果不去重就用union all,去重就用 union。 where university='山东大学' or gender="male"的话,也是去重的。 select device_id,gender,age,gpa from user_profile where university='山东大...
Mysql
2021-11-24
0
187
题解 | #统计每个用户的平均刷题数#
Mysql
2021-11-24
0
315
题解 | #统计每个学校各难度的用户平均刷题数#
select a.university,c.difficult_level, count(a.device_id)/count(distinct a.device_id) ave_answer_cnt from question_practice_detail b inner join us...
Mysql
2021-11-24
0
197
题解 | #SQL类别高难度试卷得分的截断平均值#
本题中使用两种方法: 1.使用where子句过滤条件 :先筛选再分组 2.使用分组group by :分组的结果在进行筛选 1.使用where子句过滤条件 select b.tag,b.difficulty, round((sum(c.score)-min(c.score)-max(c.sco...
Mysql
2021-11-08
0
405
JZ76 删除链表中重复的结点
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ /* 方法一: 时间复杂度:O(n),空间复杂度O...
C++
2021-10-21
0
418
JZ35 复杂链表的复制
方法一: /* struct RandomListNode { int label; struct RandomListNode *next, *random; RandomListNode(int x) : label(x), next(NULL),...
C++
链表
2021-10-19
0
351
NC24 删除有序链表中重复的元素-II
class Solution { public: /** * * @param head ListNode类 * @return ListNode类 */ ListNode* deleteDuplicates(ListNode* head)...
C++
2021-10-15
0
289
NC40 两个链表生成相加链表
NC40 两个链表生成相加链表 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x)...
C++
2021-10-15
1
371
题解 | #删除链表的倒数第n个节点#
/** struct ListNode { int val; struct ListNode *next; }; / class Solution {public: /* * * @param head ListNode类 * @param n int整型 ...
2021-08-16
0
321