题目 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
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2019-06-07 19:33:47
阅读次数:
97
不会。。。 参考: 思路类似于coin那个题,for循环中在满足条件时就及时更新当下位置的信息 ...
分类:
其他好文 时间:
2019-06-05 19:29:31
阅读次数:
85
Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Exampl ...
分类:
其他好文 时间:
2019-06-03 23:48:55
阅读次数:
107
编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 示例 2: 说明: 所有输入只包含小写字母 a-z 。 代码: 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 1: 示例 2: 说明: 所有输入只包 ...
分类:
其他好文 时间:
2019-06-02 14:15:20
阅读次数:
107
链接:https://ac.nowcoder.com/acm/contest/908/G 题意: A palindrome is a symmetrical string, that is, a string read identically from left to right as well a ...
分类:
其他好文 时间:
2019-06-01 19:32:05
阅读次数:
108
[LeetCode] Longest Substring Without Repeating Characters 最长无重复字符的子串 Given a string, find the length of the longest substring without repeating charac ...
分类:
编程语言 时间:
2019-05-30 01:18:05
阅读次数:
106
[LeetCode] 5. Longest Substring Without Repeating Characters Given a string s, find the longest palindromic substring in s. You may assume that the ma ...
分类:
其他好文 时间:
2019-05-29 16:30:47
阅读次数:
86