翻译给定一个字符串S,找出它的最大回文子字符串。
你可以假定S的最大长度为1000,
并且这里存在唯一一个最大回文子字符串。原文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 on...
分类:
其他好文 时间:
2015-09-20 14:48:24
阅读次数:
154
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 fa...
分类:
其他好文 时间:
2015-09-20 14:29:30
阅读次数:
111
题目来源:https://leetcode.com/problems/longest-common-prefix/题意分析: 这道题目是要写一个函数,找出字符串组strs的最长公共前缀子字符串。题目思路: 这都题目的难度是简单。从字符串头部开始计算,初始化公共前缀子字符串是strs[0],公共子.....
分类:
编程语言 时间:
2015-09-18 13:53:58
阅读次数:
177
#include #include int MAX_SIZE = 100000;int gen_odd_str(const char * str, char * odd_str) { int i = 0; for (i = 0; *str != 0 ; ++i, ++str) { ...
分类:
其他好文 时间:
2015-09-18 13:46:56
阅读次数:
108
O(nlgn) with repeated numbers.. Please note the extra repeat count array:class Solution {public: /** * @param nums: The integer array * @re...
分类:
其他好文 时间:
2015-09-18 07:04:44
阅读次数:
199
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes...
分类:
其他好文 时间:
2015-09-17 17:29:34
阅读次数:
167
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4...
分类:
其他好文 时间:
2015-09-17 01:13:32
阅读次数:
186
翻译
给定一个字符串,找出其没有重复字符的最大子序列的长度。
例如,“abcabcbb”的无重复字符的最大子序列是“abc”,它的长度是3。
“bbbbb”的最大子序列是“b”,它的长度是1。
原文
Given a string, find the length of the longest substring without repeating characters.
For...
分类:
其他好文 时间:
2015-09-16 12:53:21
阅读次数:
150
QuestionGiven a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating le...
分类:
其他好文 时间:
2015-09-16 06:16:09
阅读次数:
121
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-09-15 12:23:54
阅读次数:
165