Longest Common Substring($LCS$) 什么是子序列? 子序列就是某一个序列的 不连续 的一部分. 如图, $abcde$就是图中序列的一个子序列。 公共子序列 公共子序列的定义就是两个序列共有的子序列啦. qwq 一些题目就会要求我们求两个序列的最长公共子序列。 如果直接去 ...
分类:
其他好文 时间:
2018-10-08 21:40:47
阅读次数:
123
关于协议: 1 2 3 测试工具: 1 参数: 1 2 3 测试环境: 1 2 3 4 测试对象: 1 2 3 4 5 测试数据: 1、fasthttp 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 ...
分类:
Web程序 时间:
2018-10-08 15:58:12
阅读次数:
1613
一、题目 1、审题 2、分析 给出一个无序数组,求数组中存在的最长连续的数字序列的个数。 二、解答 1、思路: 方法一、 将数组排序后统计连续数值序列的个数。 方法二、 通过创建一个 Map 存储当前值的连续序列个数。 每次存入新值时,一定要更新此值的边界数值的 value。 方法三、 采用 Set ...
分类:
其他好文 时间:
2018-10-07 23:25:38
阅读次数:
228
350. Intersection of Two Arrays II 345. Reverse Vowels of a String 387. First Unique Character in a String 409. Longest Palindrome 412. Fizz Buzz 414. ...
分类:
其他好文 时间:
2018-10-06 14:28:12
阅读次数:
165
55. 跳跃游戏 给定一个非负整数数组,你最初位于数组的第一个位置。数组中的每个元素代表你在该位置可以跳跃的最大长度。判断你是否能够到达最后一个位置。 示例 1: 示例 2: 从直觉上看,因为问题只是问能不能跳到最后一个位置,所以总共能跳得越远越好。记longest为能到达的最远位置,那么有long ...
分类:
其他好文 时间:
2018-10-06 13:16:22
阅读次数:
304
Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: T ...
分类:
其他好文 时间:
2018-10-05 23:28:00
阅读次数:
300
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: ...
分类:
其他好文 时间:
2018-10-05 13:54:00
阅读次数:
168
LeetCode-Algorithms #005 Longest Palindromic Substring 英语学习时间palindromic: [医] 复发的, 再发的 在数学和计算机上,就指回文 这道题目就是找出给定字符串中最长的回文子串, 可以假定原字符串的长度不超过1000 直接遍历来做肯 ...
分类:
数据库 时间:
2018-10-04 13:20:59
阅读次数:
156
Given a n-ary 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 le ...
分类:
编程语言 时间:
2018-10-04 09:19:07
阅读次数:
155
题目 给定一个字符串,找出不含有重复字符的最长子串的长度。 示例 1: 输入: "abcabcbb" 输出: 3 解释: 无重复字符的最长子串是 "abc",其长度为 3。 示例 2: 输入: "bbbbb" 输出: 1 解释: 无重复字符的最长子串是 "b",其长度为 1。 示例 3: 输入: " ...
分类:
其他好文 时间:
2018-10-03 00:20:22
阅读次数:
157