A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {A[i], A[A[i]], A[A[ ...
分类:
其他好文 时间:
2017-12-23 14:10:55
阅读次数:
188
Description Given a string, find the length of the longest substring without repeating characters. 题意 给定一个字符串,求出不带重复字符的最长子串的长度。 Example Given "abcabcb ...
分类:
其他好文 时间:
2017-12-22 19:46:26
阅读次数:
93
1. 原题链接 https://leetcode.com/problems/longest-common-prefix/description/ 2. 题目要求 给定一个字符串数组,让你求出该数组中所有字符串的最大公共前缀。例如{"qqwwee", "qqww", "qqfds"}的最大公共前缀为" ...
分类:
其他好文 时间:
2017-12-20 13:33:20
阅读次数:
173
1)lettcode题目: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: ...
分类:
其他好文 时间:
2017-12-20 03:40:57
阅读次数:
216
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:
其他好文 时间:
2017-12-19 12:30:29
阅读次数:
210
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 题意:找到一个字符串的最长回文子 ...
分类:
其他好文 时间:
2017-12-18 19:10:59
阅读次数:
144
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 ...
分类:
其他好文 时间:
2017-12-18 12:40:29
阅读次数:
199
class Solution(object): def isSamechar(self,strs,pos): if(len(strs[0])<=pos): return False else: for i in range(1,len(strs)): if len(strs[i... ...
分类:
其他好文 时间:
2017-12-16 16:02:44
阅读次数:
181
A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {A[i], A[A[i]], A[A[... ...
分类:
其他好文 时间:
2017-12-15 23:35:06
阅读次数:
175
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest sym ...
分类:
其他好文 时间:
2017-12-14 14:56:27
阅读次数:
135