Binary Tree Right Side View问题:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered...
分类:
其他好文 时间:
2015-04-27 00:00:59
阅读次数:
265
题目:LeetCode 003 Longest Substring Without Repeating Characters题意:给一个字符串,找到一个没有重复字符的最长子串。样例:”bbbbb” 返回”b”的长度1;”abcabcbb”返回”abc”的长度3。思路:动态规划。dp[i]表示以第i个...
分类:
其他好文 时间:
2015-04-26 18:15:18
阅读次数:
117
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
基本思路:回文字符串显然有个特征是沿...
分类:
其他好文 时间:
2015-04-26 16:51:58
阅读次数:
142
Longest Common PrefixTotal Accepted:44093Total Submissions:169565My SubmissionsQuestionSolutionWrite a function to find the longest common prefix stri...
分类:
其他好文 时间:
2015-04-26 12:09:13
阅读次数:
103
原题:Given a string, find the length of the longest substring without repeating characterFor example, the Longest substring without repeating letters fo...
分类:
编程语言 时间:
2015-04-25 22:41:48
阅读次数:
229
Write a function to find the longest common prefix string amongst an array of strings.这题是寻找一组字符串的最长公共前缀,举个例子:“abc” "a"显然lPrefixString = "a",注意检查空串的情况!...
分类:
其他好文 时间:
2015-04-25 19:48:20
阅读次数:
114
问题描述:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique l...
分类:
编程语言 时间:
2015-04-25 14:54:13
阅读次数:
145
问题描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette...
分类:
编程语言 时间:
2015-04-25 14:50:46
阅读次数:
131
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
编程语言 时间:
2015-04-25 12:09:43
阅读次数:
158
Given a string S, find the length of the longest substring T that contains at most two distinct characters.Given S = “eceba”,T is “ece” which its leng...
分类:
其他好文 时间:
2015-04-24 07:48:35
阅读次数:
109