会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ChevisZhang
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
30
下一页
2020年12月16日
97. 交错字符串
摘要: 递归,DP两种方法 https://leetcode-cn.com/problems/interleaving-string/ class Solution: def isInterleave(self, s1: str, s2: str, s3: str) -> bool: # if sorted
阅读全文
posted @ 2020-12-16 14:13 ChevisZhang
阅读(92)
评论(0)
推荐(0)
2020年12月15日
groupby agg
摘要: https://www.pypandas.cn/docs/getting_started/comparison.html#%E4%B8%8Esql%E6%AF%94%E8%BE%83
阅读全文
posted @ 2020-12-15 21:21 ChevisZhang
阅读(66)
评论(0)
推荐(0)
转 [pandas] dataframe 根据特定值筛选行的方法
摘要: https://zhuanlan.zhihu.com/p/267994876 data = df.read_csv('test.csv') # 筛选不包含0的行 data = data[~ data['col'].isin([0.0])] # 同时也可以作为筛选包含0的行 data = data[d
阅读全文
posted @ 2020-12-15 20:54 ChevisZhang
阅读(1039)
评论(0)
推荐(0)
516. 最长回文子序列
摘要: class Solution: def longestPalindromeSubseq(self, s: str) -> int: # 本题的核心是怎么进行状态转移 # 对于 s[l] != s[r]的情况下,s[l:r]中的最大回文子序列来自于 max(s[l:r-1],s[l+1,r]) dp
阅读全文
posted @ 2020-12-15 13:06 ChevisZhang
阅读(84)
评论(0)
推荐(0)
87.扰乱字符串
摘要: class Solution: def isScramble(self, s1: str, s2: str) -> bool: # DP 难点分析: # 1.首先理解三层DP分别代表:长度,s1起点,s2起点 # 2.初始化DP长度为1的DP子串 # 3.状态转移方程,长度为l的dp[l]可以从dp
阅读全文
posted @ 2020-12-15 12:00 ChevisZhang
阅读(161)
评论(0)
推荐(0)
2020年12月10日
Maximum Likelihood ML
摘要: https://blog.csdn.net/u014182497/article/details/82252456 http://fangs.in/post/thinkstats/likelihood/
阅读全文
posted @ 2020-12-10 16:04 ChevisZhang
阅读(53)
评论(0)
推荐(0)
数组右边第一个比当前元素大的数 - 单调栈
摘要: in_ = [8,2,5,4,3,9,7,2,5] def right_num(in_): stack = [0] res = [-1]*len(in_) i = 1 while i<len(in_): if stack and in_[i] > in_[stack[-1]]: res[stack.
阅读全文
posted @ 2020-12-10 14:15 ChevisZhang
阅读(194)
评论(0)
推荐(0)
2020年11月30日
4. 寻找两个正序数组的中位数
摘要: 本题求两个数组求中位数,并且要求Log复杂度,那么必然用到二分法,我们就要考虑怎么比较; 1. 本题使用求两数组中第k小元素的辅助函数,使得,sumLens=7 时返回 get_k(4) , sumLens=8 时返回 get_k(4) ,get_k(5) ,由此可知,目前为止我们对于get_k的传
阅读全文
posted @ 2020-11-30 10:23 ChevisZhang
阅读(80)
评论(0)
推荐(0)
2020年11月26日
min-hash
摘要: https://www.cnblogs.com/sddai/p/6110704.html
阅读全文
posted @ 2020-11-26 13:20 ChevisZhang
阅读(76)
评论(0)
推荐(0)
2020年11月14日
怎么将anaconda中的多个环境配置到pycharm中
摘要: 转自 https://www.jianshu.com/p/1eff17aa6743?utm_campaign=haruki&utm_content=note&utm_medium=reader_share&utm_source=qq
阅读全文
posted @ 2020-11-14 14:05 ChevisZhang
阅读(240)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
30
下一页
公告