E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
Repeating
Longest Substring Without
Repeating
Characters
Longest SubstringWithoutRepeatingCharacters(来自LeetCode)Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"ab
jasonjwl
·
2016-03-25 09:00
LeetCode
substring
longest
20160323
Repeating
Decimals,All in All,Kickdown
202-RepeatingDecimals#include #include #definemaxn3000 intnum[3010],vis[3001],ap,pt=-1; intmain(){ inta,b,s; while(scanf("%d%d",&a,&b)!=-1&&b){ printf("%d/%d=",a,b); ap=0; memset(vis,0,sizeof(vis)); n
Fantastic_
·
2016-03-23 19:00
紫书
UVa 202 -
Repeating
Decimals
给你两个数,问你他们相除是多少,有无限循环就把循环体括号括起来 模拟除法运算把每一次的被除数记下,当有被除数相同时第一个循环就在他们之间。要注意50个数之后要省略号...每一次输出之后多打一个回车... 1#include 2#include 3usingnamespacestd; 4inta,b; 5intflag[30000];//记录该被除数出现的位置 6intans[10000]
nicetomeetu
·
2016-03-22 00:00
Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelongestsubstringis“b”
·
2016-03-22 00:00
LeetCode
Longest Substring Without
Repeating
Characters | Java最短代码实现
原题链接:3.LongestSubstringWithoutRepeatingCharacters【思路】本题考查最长的子字符串。本题用一个256大小的数组存储字符,数组position[i]的值代表上一次出现int类型的字符i的位置,在第二次出现该字符的时候,更新start位置,和maxLen的长度。以"abcabcbb"为例,当遍历到第二个a前一刻,start=0,position[a]=1(
happyaaaaaaaaaaa
·
2016-03-21 17:00
java
LeetCode
Longest Substring Without
Repeating
Characters 最长无重复子串
题目: Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongest
tmylzq187
·
2016-03-19 18:00
Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
Andrewseu
·
2016-03-16 17:00
LeetCode
Longest Substring Without
Repeating
Characters
#include #include #include #include #include usingnamespacestd; intlengthOfLongestSubstring(strings){ vectortemp(256,-1); intmax_l=0; intbegin=0; for(inti=0;i
HUSTLX
·
2016-03-14 22:00
leetcode003 Longest Substring Without
Repeating
Characters
题目3.LongestSubstringWithoutRepeatingCharactersGivenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whicht
jnuyanfa
·
2016-03-14 00:00
LeetCode
LeetCode第三题Longest Substring Without
Repeating
Characters
一、题目说明Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstrin
Diffey
·
2016-03-12 23:36
LeetCode - 3.Longest Substring Without
Repeating
Characters
题目Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelongestsubstringis“
u010850027
·
2016-03-12 00:00
Leetcode #3 Longest Substring Without
Repeating
Characters 解题小结
1题目理解题目原题:LongestSubstringWithoutRepeatingCharacters这道题的意思,其实也就是给定一个字符串的输入,找出一个最长的子串,而特殊要求呢,就是这个子串不能有重复的字符存在。而这道题的解题思维主要是如何界定这个子串?我总结了有如下的判断方式:最长子串一定是:*1、要么从一开始就完全没有重复字符*2、从某个位置开始,就完全没有重复字符,直到出现了重复或结束
MebiuW
·
2016-03-06 15:00
java
LeetCode
substring
最长子串
Longest Substring Without
Repeating
Characters
LeetCode题目地址:https://leetcode.com/problems/longest-substring-without-
repeating
-characters/GitHub代码:https
gatieme
·
2016-03-05 20:00
LeetCode
github
算法
面试
substring
【leetcode】【3】Longest Substring Without
Repeating
Characters
一、问题描述Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstrin
xiaoliucool1314
·
2016-02-27 09:00
java
LeetCode
String
Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
BeijingIamback
·
2016-02-26 11:21
[leetcode Q3] —— Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelongestsubstringis“b”
u012675539
·
2016-02-25 22:00
LeetCode
String
leetcode:Longest Substring Without
Repeating
Characters
问题描述:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstring
frank-liu
·
2016-02-24 22:00
LeetCode Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
wuli2496
·
2016-02-22 15:00
LeetCode3:Longest Substring Without
Repeating
Characters
原题链接:传送门Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstr
u012877472
·
2016-02-17 20:00
table
hash
Two
Pointers
[LeetCode 003] Longest Substring Without
Repeating
Characters
LongestSubstringWithoutRepeatingCharacters设置两个pointer,start指向子串的起始位置,end指向子串的终止位置。设置一个HashMap,保存字符和该字符出现的在字符串中的位置。当HashMap中已经存在某个字符,并且该字符在字符串中出现的位置在start之后,说明出现了重复字符。更新最大子串的长度max。更新HashMap中该重复字符出现在字符串
VicHawk
·
2016-02-16 15:00
LeetCode 3 Longest Substring Without
Repeating
Characters
题目链接:https://leetcode.com/problems/longest-substring-without-
repeating
-characters/题目大意:就是需找给出的串中最长的不包含重复字符的连续子串的最大长度大致思路
u013738743
·
2016-02-16 08:00
LeetCode
3
Longest Substring Without
Repeating
题目:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringi
gavinXing
·
2016-02-10 21:00
【LeetCode从零单排】No 3 Longest Substring Without
Repeating
Characters
题目Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"
phlsheji
·
2016-02-06 10:00
[LeetCode] Longest Substring Without
Repeating
Characters (LinkedHashSet的妙用)
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
lcchuguo
·
2016-02-04 13:00
Leetcode(3)-Longest Substring Without
Repeating
Characters
https://leetcode.com/problems/longest-substring-without-
repeating
-characters/ Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample
破釜沉舟——不忘初心
·
2016-02-03 03:00
Leetcode(3)-Longest Substring Without
Repeating
Characters
https://leetcode.com/problems/longest-substring-without-
repeating
-characters/ Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample
破釜沉舟——不忘初心
·
2016-02-03 03:00
Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
maoyeqiu
·
2016-02-01 16:00
LeetCode
算法
leetcode 3 Longest Substring Without
Repeating
Characters
原题:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelongestsubstringis
·
2016-01-30 23:00
LeetCode
String
Longest Substring Without
Repeating
Characters
packagecn.edu.xidian.sselab.hashtable;importjava.util.HashMap;importjava.util.HashSet;importjava.util.Map;importjava.util.Set;/** * *@authorzhiyongwang *title:LongestSubstringWithoutRepeatingCharacter
wzyxidian
·
2016-01-28 23:00
Longest Substring Without
Repeating
Characters
intlengthOfLongestSubstring(strings){ intn=s.size(); if(nlen?max_len:len;//iffindaduplicatedonecheckwhichisthelargerone len=1;//starttore-calculatelength ++i;//startnextcheckingfromj //i=jwon'tworkat
u013871984
·
2016-01-28 15:00
Longest Substring Without
Repeating
Characters
Twopointers配合HashSet相当于控制一个小窗,如果下一个字母是新的字母,那小窗就往右移一格,同时检查一下是不是最大长度,如果下一个字母是有重复的,那么就让小窗的左侧往右移动到第一个不是该字母的地方。需要注意的是,小窗左侧移动的时候,小窗右侧也要往右边移动一次,不然下一轮检查的时候,对于同一个字母会检查两次,前面的都被删光了1publicintlengthOfLongestSubstr
warmland
·
2016-01-28 02:00
leetcode(3): Longest Substring Without
Repeating
Characters
LongestSubstringWithoutRepeatingCharactersGivenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthele
luckysimple
·
2016-01-26 17:00
Longest Substring Without
Repeating
Characters
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
KickCode
·
2016-01-24 07:00
java
字符串
Uva 202.
Repeating
Decimals
题目大意就是取循环小数的循环节思路比较清晰完全模拟人脑做除法,同时分组标记被除数和除数,判断循环节中间需要判断是除尽和没除尽两种情况最后要关注格式,每两个输出要有空行,且第二行前有3个空格 一下代码1#include 2#include 3usingnamespacestd; 4 5#defineREP(n)for(into=0;o
OhYee
·
2016-01-22 23:00
Longest Substring Without
Repeating
Characters (Python版)
题目:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis
温温wds
·
2016-01-22 23:24
LeetCode
python
Longest Substring Without
Repeating
Characters (Python版)
题目:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis
温温wds
·
2016-01-22 23:24
python
leetcode
leetcode
CSS3之渐变
渐变语法:使用background-image属性进行设置可以取值:linear-gradient:线性渐变radial-gradient:径向渐变
repeating
-linear-gradient
木杉彬彬彬
·
2016-01-22 17:00
LeetCode-3.Longest Substring Without
Repeating
Characters
题目大意:给你一串字符串,找出没有重复字符的最长子串,输出其长度。解题思路:其基本思想肯定是遍历,遍历其所有的子串,但工作量太大。采用贪心算法,从左往右扫描,当遇到重复的字母时,将上一个重复字母以及重复字母以前的字母全部删掉,将上一个字母index+1,作为新的子串搜索起始位置,直到最后一个字母,复杂度为O(n)由于不知道具体子串的长度,所以采用ArrayList来存取子串,也便于判断重复字母,查
u010010428
·
2016-01-22 15:00
[Leetcode_PY]Longest Substring Without
Repeating
Characters
题目Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelongestsubstringis“
xshalk
·
2016-01-20 15:00
LeetCode
python
LeetCode题解 #3 Longest Substring Without
Repeating
Characters
找出字符串中没有相同字符的的最长串注意这里的 Characters指的是字符,不是字母,就是说|/?~这样的字符都会出现,所以要用到ASCII码 最简单的方法是,从第一个字符开始,往后一个个判断,里面有没有重复的字符,如果重复了则记录下长度。例如:abcabcbb第一次:abc重复于a 长度3第二次:bca重复与b 长度3第三次:cab 重复与c 长度3...... 但这种方法很耗时如果是abcd
wzben
·
2016-01-19 20:00
Longest Substring Without
Repeating
Characters
题目原题链接Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstrin
NinthDay
·
2016-01-18 23:41
YTU 2903: A--A
Repeating
Characters
2903:A--ARepeatingCharacters时间限制: 1Sec 内存限制: 128MB提交: 50 解决: 30题目描述Forthisproblem,youwillwriteaprogramthattakesastringofcharacters,S,andcreatesanewstringofcharacters,T,witheachcharacterrepeatedRtime
qq_28954601
·
2016-01-11 15:00
Longest Substring Without
Repeating
Characters
3.LongestSubstringWithoutRepeatingCharactersMySubmissionsQuestionTotalAccepted: 126422 TotalSubmissions: 589058 Difficulty: MediumGivenastring,findthelengthofthelongestsubstringwithoutrepeatingcharact
EbowTang
·
2016-01-09 22:00
LeetCode
数据结构
面试
数组
哈希map
【LeetCode】LeetCode——第3题: Longest Substring Without
Repeating
Characters
3.LongestSubstringWithoutRepeatingCharactersMySubmissionsQuestionTotalAccepted: 116906 TotalSubmissions: 554008 Difficulty: MediumGivenastring,findthelengthofthelongestsubstringwithoutrepeatingcharact
hujingshuang
·
2016-01-06 20:00
LeetCode
STL
substring
substring
longest
wi
003Longest Substring Without
Repeating
Characters (C)
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
molu_chase
·
2016-01-06 16:00
Longest Substring Without
Repeating
Characters
Probledescription:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelon
Mark__Zeng
·
2016-01-03 17:25
leetcode
Leetcode
Longest Substring Without
Repeating
Characters
Probledescription:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor“abcabcbb”is“abc”,whichthelengthis3.For“bbbbb”thelon
Mark__Zeng
·
2016-01-03 17:25
leetcode
Leetcode
Longest Substring Without
Repeating
Characters Leetcode Python New season for 2016
Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"b"
hyperbolechi
·
2015-12-29 11:00
LeetCode: 3_Longest Substring Without
Repeating
Characters | 求没有重复字符的最长子串的长度 | Medium
题目:Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis
bakari
·
2015-12-27 10:00
leetcode第3题——**Longest Substring Without
Repeating
Characters
题目Givenastring,findthelengthofthelongestsubstringwithoutrepeatingcharacters.Forexample,thelongestsubstringwithoutrepeatinglettersfor"abcabcbb"is"abc",whichthelengthis3.For"bbbbb"thelongestsubstringis"
buptlrw
·
2015-12-19 22:00
java
LeetCode
python
上一页
13
14
15
16
17
18
19
20
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他