【LeetCode】Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
查找给定字符串中最长的无重复字符的子串...
分类:
其他好文 时间:
2015-06-26 16:22:02
阅读次数:
103
// 1、判断strs的长度,如果为0则返回空字符
// 2、找出strs中最短的字串
// 3、采用循环查询的方式依次匹配是否和最短字串相符
// 4、循环中实时更新查询的长度index#include
#include
#include char* longestCommonPrefix(char** strs, int str...
分类:
其他好文 时间:
2015-06-25 14:08:29
阅读次数:
195
1. 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 do...
分类:
其他好文 时间:
2015-06-25 00:00:30
阅读次数:
281
#104 Maximum Depth of Binary Tree
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...
分类:
其他好文 时间:
2015-06-24 22:38:28
阅读次数:
164
1. Question找字符串数组的最长公共前缀,是所有字符串的。Write a function to find the longest common prefix string amongst an array of strings.2. Solution(O(mn))以第一个字符串作为前缀初值...
分类:
其他好文 时间:
2015-06-24 00:35:28
阅读次数:
125
Leetcode 03 Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For e...
分类:
其他好文 时间:
2015-06-23 23:07:53
阅读次数:
115
题目三: Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.For example, ...
分类:
其他好文 时间:
2015-06-23 22:59:27
阅读次数:
112
#14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
这个题求多个字符串的公共前缀,除了要考虑串空外,如果存在公共前缀,那么必定也是第一个串的前缀。
所以可以以第一个串为基准,比较其他串的前缀是否与第一个串相同。
c...
分类:
其他好文 时间:
2015-06-23 11:55:01
阅读次数:
129
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3530SubsequenceDescriptionThere is a sequence of integers. Your task is to find the longest subsequence ...
分类:
其他好文 时间:
2015-06-22 22:02:05
阅读次数:
177
C. Longest Regular Bracket SequenceTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/problemset/problem/5/CDescriptionThis is yet anothe...
分类:
其他好文 时间:
2015-06-22 20:40:00
阅读次数:
139