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
题意 要你找一个最长的区间使得区间内每一个数出现次数都大于等于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
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Example 2: ...
分类:
其他好文 时间:
2019-08-22 23:56:36
阅读次数:
174
Given a string s that consists of only uppercase English letters, you can perform at most k operations on that string. In one operation, you can choos ...
分类:
其他好文 时间:
2019-08-21 13:39:34
阅读次数:
95
我们把数组 A 中符合下列属性的任意连续子数组 B 称为 “山脉”: B.length >= 3 存在 0 < i < B.length - 1 使得 B[0] < B[1] < ... B[i-1] < B[i] > B[i+1] > ... > B[B.length - 1](注意:B 可以是 ...
分类:
编程语言 时间:
2019-08-20 21:50:32
阅读次数:
72