Total Accepted:82026Total Submissions:379898Difficulty:MediumGiven a stringS, find the longest palindromic substring inS. You may assume that the maxi...
分类:
其他好文 时间:
2015-12-07 22:48:22
阅读次数:
294
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line a...
分类:
编程语言 时间:
2015-12-07 20:30:34
阅读次数:
223
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-12-07 20:30:10
阅读次数:
183
可以借助 stack 一次遍历就将全部有效括号替换为 '.'。 第一步:一次遍历,stack 只存放 '(' 的下标。 当找到一个 '(',则压进 stack ; 当找到一个 ')',则把 stack.top 对于的字符替换为 '.',并弹出 stack.pop()。耗时O(n...
分类:
其他好文 时间:
2015-12-06 17:47:28
阅读次数:
139
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-12-03 21:24:33
阅读次数:
220
cdq分治,dp(i)表示以i为结尾的最长LIS,那么dp的递推是依赖于左边的。因此在分治的时候需要利用左边的子问题来递推右边。(345ms? 区间树TLE/********************************************************** -...
分类:
其他好文 时间:
2015-12-02 09:09:20
阅读次数:
492
3135 - Argus A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensordata, Internet traffic, financial tic...
分类:
其他好文 时间:
2015-12-01 22:48:42
阅读次数:
209
题目连接https://leetcode.com/problems/find-median-from-data-stream/Find Median from Data StreamDescriptionMedian is the middle value in an ordered integer...
分类:
其他好文 时间:
2015-12-01 21:06:00
阅读次数:
189
C++暴力搜索两个游标一个长度i遍历aj遍历blen遍历公共子串长度 1 class Solution { 2 public: 3 /** 4 * @param A, B: Two string. 5 * @return: the length of the lo...
分类:
其他好文 时间:
2015-12-01 14:28:03
阅读次数:
168
public class Solution { public int lengthOfLIS(int[] nums) { int length = nums.length; List record = new ArrayList(); for (int...
分类:
其他好文 时间:
2015-12-01 09:41:45
阅读次数:
168