Kaka777
Kaka777
全部文章
分类
个人题解笔记(1)
题解(12)
归档
标签
去牛客网
登录
/
注册
Kaka777的博客
全部文章
(共13篇)
题解 | #字符串变形#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @param n int整型 # @return string字符串 # class Solution: def trans(self , s: st...
Python3
字符串
2022-02-25
0
367
题解 | #最长的括号子串#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @return int整型 # class Solution: def longestValidParentheses(self , s: str) -...
Python3
字符串
动态规划
2022-02-25
1
281
题解 | #编辑距离(二)#
写个 二维数组方式实现的编辑距离。 对于一维数组的改进方式 来简化空间复杂度, 我不是很能理解。 所以我对这道题目的把握更多是理解掌握二维数组的动态规划过程。 需要的话 会回来更新 对一维数组的使用 class Solution: def minEditCost(self , str1: s...
Python3
动态规划
字符串
数组
2022-02-19
0
275
题解 | #大数加法#
class Solution: def solve(self , s , t ): # write code here # mimic the plus calculation. not allowed using inte converter ...
Python3
2022-02-06
0
281
题解 | #在last_update后面新增加一列名字为create_date#
ADD column with column definition before or after one specific column ALTER TABLE actor ADD COLUMN create_date datetime NOT NULL DEFAULT '2020-10-01 ...
Mysql
2022-01-29
0
203
题解 | #获得积分最多的人(三)#
最近在练习CTE 准备把做过的中等及其以上难度的题目中 子查询都改成 WITH query 这题 用CTE解法 如下 WITH grade_total AS( SELECT user_id, SUM(CASE WHEN type='add' THEN ...
Mysql
2022-01-08
0
244
题解 | #汇总各个部门当前员工的title类型的分配数目#
# Join dept_emp and titles to get the emp_no and its dept_no and titles # titles are linked to emp_no not dept_no # 得到 一个表 包含了 所有 现有员工的 员工号及其对应的 薪水之后...
Mysql
2021-09-16
0
254
题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
So 1. In MySQL and SQL servers like PostgreSQL, AGG function and single columns cannot be selected at the same time unless the single columns are also...
GOUPBY
HAVING
NESTEDSELECT
2021-08-08
0
309
题解 | #获取每个部门中当前员工薪水最高的相关信息#
Step1: it is straightforward to use INNER JOIN to collect all required info from given tables. So we could create one table just containing the result...
SQL
GOUPBY
TWOTABLES
2021-08-07
2
366
题解 | #重建二叉树#
Divider and conquer with recursion:for each tree, it is composed of three parts: root-left branch, right branch. each branch is also composed of root&...
devider
and
conquer
recursion
Python
hashtable
2021-08-06
0
293
首页
上一页
1
2
下一页
末页