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-24 10:52:51
阅读次数:
111
We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra ...
分类:
其他好文 时间:
2018-10-23 10:58:59
阅读次数:
157
The xor-longest Path Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10038 Accepted: 2040 Description In an edge-weighted tree, the xor-len ...
分类:
其他好文 时间:
2018-10-21 12:13:19
阅读次数:
236
Given a string and a string dictionary, find the longest string in the dictionary that can be formed by deleting some characters of the given string. ...
分类:
其他好文 时间:
2018-10-20 23:52:36
阅读次数:
275
You are given an integer array sorted in ascending order (may contain duplicates), you need to split them into several subsequences, where each subseq ...
分类:
编程语言 时间:
2018-10-18 11:02:35
阅读次数:
215
传送门: "Palindrome" 题意 求最长回文字符串,在学manacher算法,所以用了manacher,看到网上好多题解使用后缀数组来做的。 思路 manacher算法,参考《ACM国际大学生程序设计竞赛 算法与实现》的板子,一开始我以为板子的manacher算法是错误的,然后上网看题解。 ...
分类:
编程语言 时间:
2018-10-16 19:25:29
阅读次数:
217
Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the roo ...
分类:
其他好文 时间:
2018-10-16 10:15:28
阅读次数:
311
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe ...
分类:
其他好文 时间:
2018-10-15 11:47:32
阅读次数:
134
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-14 20:53:01
阅读次数:
102
Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other wo ...
分类:
其他好文 时间:
2018-10-14 13:52:33
阅读次数:
122