https://leetcode.com/tag/array/ ...
分类:
编程语言 时间:
2019-02-11 20:04:55
阅读次数:
189
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: Output ...
分类:
其他好文 时间:
2019-02-11 12:26:57
阅读次数:
172
Take 2 strings s1 and s2 including only letters from ato z. Return a new sorted string, the longest possible, containing distinct letters, each taken ...
分类:
其他好文 时间:
2019-02-11 10:25:28
阅读次数:
210
Description: 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-02-10 23:08:13
阅读次数:
232
Sliding Window Problems 76. Minimum Window Substring 438. Find All Anagrams in a String 30. Substring with Concatenation of All Words 3. Longest Subst ...
分类:
其他好文 时间:
2019-02-09 19:29:07
阅读次数:
179
https://leetcode.com/problems/longest-uncommon-subsequence-i/ Given a group of two strings, you need to find the longest uncommon subsequence of this ...
分类:
其他好文 时间:
2019-02-09 19:22:08
阅读次数:
174
A.Slightly Decreasing Permutations Permutation p is an ordered set of integers p1, p2, ..., pn, consisting of n distinct positive integers, each of th ...
分类:
其他好文 时间:
2019-02-09 10:19:12
阅读次数:
141
LCS是Longest Common Subsequence的缩写,即最长公共子序列。一个序列,如果是两个或多个已知序列的子序列,且是所有子序列中最长的,则为最长公共子序列。(摘自百度百科) 一.DP通法 给定串1和串2,求其LCS 譬如给定2个序列: 求其最长的公共子序列。 显然长度是3,包含3 ...
分类:
其他好文 时间:
2019-02-09 01:00:28
阅读次数:
183
题目链接: https://vjudge.net/problem/19213/origin 大致题意: 一个滑雪者想知道自己在固定高度的山坡中最多能滑的距离是多少。 思路: 首先想到的就是dfs,但是。。超时了,所以我们要用到动态规划进行优化。 dfs的思路就是从第一个位置开始dfs搜索。 dp的思 ...
分类:
其他好文 时间:
2019-02-08 01:03:21
阅读次数:
211
1 #define _for(i,a,b) for(int i = (a);i & nums) 6 { 7 int sz = nums.size(); 8 vector> dp (sz,{1,1});//LISlen times 9 10 int LISlen = 1; 1... ...
分类:
其他好文 时间:
2019-02-07 09:23:37
阅读次数:
199