原题链接在这里:https://leetcode.com/problems/longest-common-subsequence/ 题目: Given two strings text1 and text2, return the length of their longest common sub ...
分类:
其他好文 时间:
2019-09-03 09:32:48
阅读次数:
62
1040 Longest Symmetric String (25 分) 1040 Longest Symmetric String (25 分) 1040 Longest Symmetric String (25 分) Given a string, you are supposed to out ...
分类:
其他好文 时间:
2019-08-31 10:29:26
阅读次数:
72
Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Note: There may be more than one LIS combination, it ...
分类:
其他好文 时间:
2019-08-31 01:16:31
阅读次数:
124
转自:https://www.cnblogs.com/coffy/p/5878915.html 设f(i)表示L中以ai为末元素的最长递增子序列的长度。则有如下的递推方程: 这个递推方程的意思是,在求以ai为末元素的最长递增子序列时,找到所有序号在L前面且小于ai的元素aj,即j<i且aj<ai。如 ...
分类:
其他好文 时间:
2019-08-30 20:42:30
阅读次数:
65
Description: A permutation, also called an “arrangement number” or “order,” is a rearrangement of the elements of an ordered list S into a one-to-one ...
分类:
其他好文 时间:
2019-08-30 19:35:15
阅读次数:
76
题意 要你找一个最长的区间使得区间内每一个数出现次数都大于等于K。 题解-》https://blog.csdn.net/Ratina/article/details/97503663 #include<bits/stdc++.h> using namespace std; #define lson ...
分类:
其他好文 时间:
2019-08-30 16:03:01
阅读次数:
65
Leetcode 5. Longest Palindromic Substring(最长回文子串, Manacher算法) Given a string s, find the longest palindromic substring in s. You may assume that the m ...
分类:
编程语言 时间:
2019-08-26 21:17:29
阅读次数:
121
题目链接:https://leetcode-cn.com/problems/longest-consecutive-sequence/ 题目大意: 略。 分析: 注意有重复值,序列为空等情况。 代码如下: 1 class Solution { 2 public: 3 int longestConse ...
分类:
其他好文 时间:
2019-08-25 18:21:59
阅读次数:
57
3. Longest Substring Without Repeating Characters Medium Medium Given a string, find the length of the longest substring without repeating characters. ...
分类:
其他好文 时间:
2019-08-24 20:22:40
阅读次数:
80
原题链接在这里:https://leetcode.com/problems/longest-word-in-dictionary-through-deleting/ 题目: Given a string and a string dictionary, find the longest string ...
分类:
其他好文 时间:
2019-08-24 09:18:56
阅读次数:
76