依旧水题一道,两头往后滑动,用数组映射出现的字符就行。
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc",
which the length is 3.
...
分类:
其他好文 时间:
2016-08-23 22:11:25
阅读次数:
128
Given two strings, find the longest common subsequence (LCS). 最长公共子序列 Your code should return the length of LCS. Given two strings, find the longest c ...
分类:
其他好文 时间:
2016-08-23 22:02:59
阅读次数:
192
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2016-08-22 22:57:42
阅读次数:
98
题目: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", th ...
分类:
其他好文 时间:
2016-08-22 21:47:24
阅读次数:
146
1551: Longest Increasing Subsequence Again Description Give you a numeric sequence. If you can demolish arbitrary amount of numbers, what is the lengt ...
分类:
其他好文 时间:
2016-08-22 12:18:10
阅读次数:
203
Question:
Given a binary 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 leaf node.
找二叉树的最大深度
Algori...
分类:
其他好文 时间:
2016-08-22 10:53:34
阅读次数:
132
问题描述: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which th ...
分类:
其他好文 时间:
2016-08-21 19:46:57
阅读次数:
104
Leetcode算法比赛题目之:Longest Absolute File Path 原文链接:https://leetcode.com/contest/1/problems/longest-absolute-file-path/ 图片格式: Java算法实现 ...
分类:
编程语言 时间:
2016-08-21 15:14:47
阅读次数:
583
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
分类:
其他好文 时间:
2016-08-21 15:10:35
阅读次数:
155
Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" whi ...
分类:
其他好文 时间:
2016-08-19 13:12:56
阅读次数:
135