EE205 Project 2Assign 2019-05-20 Due 2019-06-18 Longest Palindromic Subsequence Given a sequence, find the length of the longest palindromic subsequen ...
分类:
其他好文 时间:
2019-06-12 19:59:18
阅读次数:
357
Algorithms: https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 采用了map的存储,然后移动窗口方式解决此问题,当然看到有个动态规划,一直很难理解。 Review: https: ...
分类:
其他好文 时间:
2019-06-10 00:11:08
阅读次数:
84
题目 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
本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/91349859 1096 Consecutive Factors (20 分) 1096 Consecutive Factors (20 分) 1096 Consec ...
分类:
其他好文 时间:
2019-06-09 09:45:37
阅读次数:
93
"题目链接" 对第一个串建出$SAM$,然后用第二个串去匹配。 如果能往下走就往下走,不能的话就跳parent tree的父亲,直到能走为止。如果跳到$0$了还是不能走,重新匹配。 cpp include include include using namespace std; const int ...
分类:
其他好文 时间:
2019-06-09 09:15:52
阅读次数:
74
You are given an array 𝑎1,𝑎2,…,𝑎𝑛 and an integer 𝑘 . You are asked to divide this array into 𝑘 non-empty consecutive subarrays. Every element in ...
分类:
编程语言 时间:
2019-06-07 20:52:57
阅读次数:
106
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