Algorithms: https://leetcode-cn.com/problems/longest-palindromic-substring/ 中心扩展法首先考虑,当然看到有个动态规划,一直很难理解。动态规划要好好研究一番。 Review: https://link.medium.com/r ...
分类:
其他好文 时间:
2019-06-17 01:09:40
阅读次数:
106
难度: 中等 题目 Given a string, find the length of the longest substring without repeating characters. 给定一个字符串,请你找出其中不含有重复字符的?最长子串?的长度。 示例?1: 输入: "abcabcbb" ...
分类:
其他好文 时间:
2019-06-16 21:49:27
阅读次数:
99
SQL 中的 substring 函数是用来截取一个栏位资料中的其中一部分。 例如,我们需要将字符串'abdcsef'中的‘abd’给提取出来,则可用substring 来实现: 查询结果: 括号中数字‘1’表示截取的起始位置是从该字符串第一个字符开始,‘3’表示截取后得到的字符串长度为3个字符。 ...
分类:
数据库 时间:
2019-06-11 19:32:29
阅读次数:
158
Algorithms: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 采用了map的存储,然后移动窗口方式解决此问题,当然看到有个动态规划,一直很难理解。 Review: https: ...
分类:
其他好文 时间:
2019-06-10 00:11:08
阅读次数:
84
find()方法 find()范围查找子串,返回索引值,找不到返回-1 语法 s.find(substring, start=0, end=len(string)) 参数 substring -- 指定检索的字符串 start -- 开始索引,默认为0。 end -- 结束索引,默认为字符串的长度。... ...
分类:
编程语言 时间:
2019-06-09 12:37:29
阅读次数:
103
题目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example1: & 8195; Input: "babad ...
分类:
其他好文 时间:
2019-06-09 09:53:14
阅读次数:
114
"题目链接" 对第一个串建出$SAM$,然后用第二个串去匹配。 如果能往下走就往下走,不能的话就跳parent tree的父亲,直到能走为止。如果跳到$0$了还是不能走,重新匹配。 cpp include include include using namespace std; const int ...
分类:
其他好文 时间:
2019-06-09 09:15:52
阅读次数:
74
一:转为字符串 1. value + toString() 2. String(value) 3. value + " " 区别: null和undefined没有toString()方法,在不知道value是否为这两个值是可用String(value)或value+ "", 二:操作方式 1.ch ...
分类:
其他好文 时间:
2019-06-09 00:30:25
阅读次数:
111