Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest sym ...
分类:
其他好文 时间:
2018-08-12 14:18:32
阅读次数:
165
3 Longest Substring Without Repeating Characters https://www.youtube.com/watch?v=dH5t6rWmob0 template https://leetcode.com/problems/minimum-window-sub... ...
分类:
其他好文 时间:
2018-08-10 15:57:11
阅读次数:
187
124. Binary Tree Maximum Path Sum https://github.com/tongzhang1994/Facebook-Interview-Coding/blob/master/Longest%20Path%20in%20Binary%20Tree.java http ...
分类:
其他好文 时间:
2018-08-10 15:47:35
阅读次数:
131
求字符串的最长回文子串。 看了hint没看solution。开心。 暴力的思路是O(n^2) start - end pairs and O(n) palindromic checks。但是1000的复杂度只能采用O(n^2)的做法。所以目标是压缩cheak过程的复杂度。关键是:如何利用之前的判断结 ...
分类:
其他好文 时间:
2018-08-07 01:36:14
阅读次数:
112
Questions: [LeetCode] 198. House Robber _Easy tag: Dynamic Programming [LeetCode] 221. Maximal Square _ Medium Tag: Dynamic Programming [LeetCode] 62. ...
分类:
其他好文 时间:
2018-08-07 01:33:58
阅读次数:
141
[抄题]: Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The length o ...
分类:
其他好文 时间:
2018-08-05 10:28:51
阅读次数:
194
Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given po ...
分类:
其他好文 时间:
2018-08-05 00:37:08
阅读次数:
120
2018-08-04 20:47:43 问题描述: 问题描述: 本题需要的是将一个数组划分成子序列,保证每个子序列是连续的,并且长度要大于等于3。 解题思路是使用贪心算法,首先对数组中的数字进行计数,然后遍历数组,对每个数字,如果说candidate中有这个数字,那么意味着它可以和之前的子序列组成更 ...
分类:
编程语言 时间:
2018-08-04 21:39:32
阅读次数:
213
题目如下: 解题思路:很经典的动态规划题目,但是用python会超时,只好用C++了。 代码如下: ...
分类:
其他好文 时间:
2018-08-04 17:23:36
阅读次数:
116
Description Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those l ...
分类:
其他好文 时间:
2018-08-04 11:47:41
阅读次数:
116