Kaka777
Kaka777
全部文章
题解
个人题解笔记(1)
归档
标签
去牛客网
登录
/
注册
Kaka777的博客
全部文章
/ 题解
(共12篇)
题解 | #字符串变形#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @param n int整型 # @return string字符串 # class Solution: def trans(self , s: st...
Python3
字符串
2022-02-25
0
370
题解 | #最长的括号子串#
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param s string字符串 # @return int整型 # class Solution: def longestValidParentheses(self , s: str) -...
Python3
字符串
动态规划
2022-02-25
1
289
题解 | #编辑距离(二)#
写个 二维数组方式实现的编辑距离。 对于一维数组的改进方式 来简化空间复杂度, 我不是很能理解。 所以我对这道题目的把握更多是理解掌握二维数组的动态规划过程。 需要的话 会回来更新 对一维数组的使用 class Solution: def minEditCost(self , str1: s...
Python3
动态规划
字符串
数组
2022-02-19
0
279
题解 | #大数加法#
class Solution: def solve(self , s , t ): # write code here # mimic the plus calculation. not allowed using inte converter ...
Python3
2022-02-06
0
289
题解 | #在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
209
题解 | #获得积分最多的人(三)#
最近在练习CTE 准备把做过的中等及其以上难度的题目中 子查询都改成 WITH query 这题 用CTE解法 如下 WITH grade_total AS( SELECT user_id, SUM(CASE WHEN type='add' THEN ...
Mysql
2022-01-08
0
250
题解 | #汇总各个部门当前员工的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
259
题解 | #获取每个部门中当前员工薪水最高的相关信息#
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
370
题解 | #重建二叉树#
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
299
题解 | #括号生成#
Backtracking is also DFS but it is a little bit different from DFS. the nuance is we backtrack to the previous level of the tree so we have pop-off ac...
backtrack
dfs
Python
2021-08-05
0
295
首页
上一页
1
2
下一页
末页