地址 https://leetcode-cn.com/problems/xuan-zhuan-shu-zu-de-zui-xiao-shu-zi-lcof/ https://leetcode-cn.com/problems/find-minimum-in-rotated-sorted-array-i ...
分类:
编程语言 时间:
2020-07-22 11:21:34
阅读次数:
62
在c++中检查字符串是否包含另一串字符串,这个本来是我做过的一个算法题,不过最近刚好有个需求让我想到了这个题,就在此记录一下! 使用std::string::findfunction string str ("There are two needles in this haystack."); st ...
分类:
编程语言 时间:
2020-07-22 02:02:45
阅读次数:
79
对于这道题,可以想想对于每个b[i],a[i]中可选的位置的区间在哪,这样只要找到区间,就能知道当前可以选那几个位置断开 b[1]的开头肯定是1号位,而我们发现如果对后缀求一下后缀的最小值,这样就天然满足题目条件,我们用一个map存一下答案,就能知道b[i]是最小值的区间是哪些 因为b是单调递增的数 ...
分类:
其他好文 时间:
2020-07-22 02:00:03
阅读次数:
62
Pandas的Merge相当于sql的join,将不同的表关联在一个表 #读取电影数据,sep为分割符 df_ratings=pd.read_csv(r'...\datas\movielens-1m\ratings.dat',sep='',engine='python',names='UserIDM ...
分类:
其他好文 时间:
2020-07-21 23:22:47
阅读次数:
88
在gradle中,如果多个子项目使用目录进行分组,可以使用如下方法 // include two projects, 'foo' and 'foo:bar' // directories are inferred by replacing ':' with '/' include 'foo:bar' ...
分类:
其他好文 时间:
2020-07-21 22:45:12
阅读次数:
108
原作者:CodingCode 原链接:https://www.jianshu.com/p/ff1877c5864e git merge的三种操作merge, squash merge, 和rebase merge 举例来说: 假设在master分支的B点拉出一个新的分支dev,经过一段时间开发后: ...
分类:
其他好文 时间:
2020-07-21 22:33:40
阅读次数:
71
Hadoop - hdfs dfs常用命令的使用 用法 1,-mkdir 创建目录Usage:hdfs dfs -mkdir [-p] < paths>选项:-p很像Unix mkdir -p,沿路径创建父目录。 2,-ls 查看目录下内容,包括文件名,权限,所有者,大小和修改时间Usage:hdf ...
分类:
其他好文 时间:
2020-07-21 21:48:33
阅读次数:
80
题目链接 Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each r ...
分类:
其他好文 时间:
2020-07-21 21:35:20
阅读次数:
72
【原题】 Note that the memory limit is unusual. You are given a multiset consisting of nn integers. You have to process queries of two types: add integer ...
分类:
其他好文 时间:
2020-07-21 21:33:29
阅读次数:
83
#添加.gitattributes 目的: 合并时使用本地的composer.json文件 #注:第一次合并时,只有两处分支都对composer.json有修改,即有冲突时才会使用此规则。 merge=ours 我的理解是合并并且发生冲突时使用自己的composer.json文件,第一次若仅仅是一处 ...
分类:
其他好文 时间:
2020-07-21 14:28:01
阅读次数:
113