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
Substring
LeetCode学习之路-Longest
Substring
Without Repeating Characters
Givenastring,findthelengthofthelongest
substring
withoutrepeatingcharacters.Examples:Given“abcabcbb”,theansweris
TTSJ
·
2020-08-17 14:03
leetcode
leetcode
LeetCode学习之路-Longest Palindromic
Substring
Givenastrings,findthelongestpalindromic
substring
ins.Youmayassumethatthemaximumlengthofsis1000.Example
TTSJ
·
2020-08-17 14:03
leetcode
leetcode
mysql将一段文字切分之后插入表中
二、具体操作INSERTINTOt_location(`location`)SELECTnumfrom(SELECT
SUBSTRING
_INDEX(
SUBSTRING
_INDEX('扬州,杭州,无锡,盐城
明月清风_Dustin
·
2020-08-17 13:32
工具
Application.StartupPath获取执行文件路径
substring
()取特定长度字符串取得根目录
usingSystem.Windows.Forms;控制台程序添加System.Windows.Forms;因为是控制台应用程序,还要去添加引用//获取了应用程序路径,不包括可执行文件名称。stringpath1=Application.StartupPath;Console.WriteLine(path1);//获取启动了应用程序的可执行文件的路径,包括可执行文件的名称。stringpath2=
傻木耳
·
2020-08-17 11:32
【leetcode】第3题 无重复字符的最长子串(Longest
Substring
Without Repeating Characters)做题记录 C++实现
leetcode第3题#3.无重复字符的最长子串(Longest
Substring
WithoutRepeatingCharacters)今天把第三题做完了,各个方法都尝试了一下,思考与学习的时间有点长,
Steve_Stone
·
2020-08-17 11:51
C/C++
算法
算法题集
动态规划
总结:https://labuladong.gitbook.io/algo/最长回文子串https://leetcode-cn.com/problems/longest-palindromic-
substring
我是小曼巴
·
2020-08-17 10:14
按指定的字符把字符串分割为字符串数组
=pre)list.add(_str.
substring
(pre,i));pre=i+
yuxuepiaoguo
·
2020-08-17 10:50
JAVA
MySQL 返回指定长度的字符串
今天在做iblog项目时,有一个需求是,从MySQL返回某个字段的值要时要指定长度,上网搜到的方法是使用MySQL的字符串处理函数,如left(str,length),right(str,length),
substring
weixin_38171030
·
2020-08-17 09:55
C#中截取字符串的的基本方法详解
分享几个经常用到的字符串的截取stringstr="123abc456";inti=3;1取字符串的前i个字符str=str.
Substring
(0,i);//orstr=str.Remove(i,str.Length-i
·
2020-08-17 09:05
java String中汉字的截取
args)throwsException{Stringstr="我abc汗";intnum=trimGBK(str.getBytes("GBK"),6);System.out.println(str.
substring
倾-尽
·
2020-08-17 09:48
leetCode 第三题
classSolution{publicintlengthOfLongest
Substring
(Strings){Sets1=newHashSet();intlen=s.length();intcurrent
Jeremy__Zhu
·
2020-08-17 09:59
LeetCode
面试
Datastruct
Java中不使用split方法实现字符串分割成字符数组
Java中不使用split方法实现字符串分割成字符数组核心思想利用indexOf方法来定位分割符spliter利用
substring
方法来截取分隔符前后的字符串,前字符串放到list中循环操作1,2两个步骤
_snowing_
·
2020-08-17 09:27
Java
JAVA Pattern正则获取大括号中内容,
substring
字符串截取获取大括号中内容
利用正则表达式获取字符串中想要的值:获取符串场景:你好呀(嘻嘻)我需要获取“嘻嘻”该如何获取呢?1.通过正则表达式获取:Stringstr="你好呀(嘻嘻)";Patternp=Pattern.compile("\\(([^\\)]+)");Matchermatcher=p.matcher(str);if(matcher.find()&&matcher.groupCount()>=1){Syste
Java开发者NB
·
2020-08-17 08:34
java
后端
java
正则表达式
3. 无重复字符的最长子串(Leetcode )
题目链接题目中的关键变量:[st,i]是无重复字符的子串,ans当前最长子串,任务:搜索所有无重复字符的子串classSolution{public:intlengthOfLongest
Substring
哈哈开心吗
·
2020-08-17 07:24
Substring
Removal Game
题目题意:有两个人,每一次都可以取序列中连续的部分,然后取完的两边会相邻,问先取的那个人最多可以取多少个111,两个人都取最优。思路:我们直接将连续的111个数全部提取出来,先取的是拿最大的,后取的第二大...............直到取完,所以我们取下标为偶数位的就行了(下标000开始)。#include#include#include#include#include#include#incl
忘梦心
·
2020-08-17 07:36
codeforces
Atcoder Panasonic Programming Contest 2020 E Three
Substring
s
题意:给你三个串(长度<=2000),串中含有的'?'字符可以匹配成任意字符,这三个串是取自同一个主串的子串,求这个主串的最长长度这个题好好分析下其实不难,就是个模拟然后的话,这题很容易想歪,我一开始想,啊,是求三个串的最长公共子串吧,然后又想,唉,只能用SAM,很麻烦,而且完全不会想歪了!这么求怎么可能对嘛,它取自同一主串,你匹配上最长公共子串,但是这三串前后都不一样怎么行啊,同一主串啊既然是同
でこもり さなえ
·
2020-08-17 07:53
ZOJ - 3985 - String of CCPC (分类讨论)
65536KBBaoBaohasjustfoundastringoflengthconsistingof'C'and'P'inhispocket.AsabigfanoftheChinaCollegiateProgrammingContest,BaoBaothinksa
substring
ofis"good
vloai
·
2020-08-17 06:42
ZOJ
最长回文子串 Longest Palindromic
Substring
给定一个字符串s,找到s中最长的回文子串。你可以假设s的最大长度为1000。示例1:输入:"babad"输出:"bab"注意:"aba"也是一个有效答案。示例2:输入:"cbbd"输出:"bb"摘要这篇文章是为中级读者而写的。它介绍了回文,动态规划以及字符串处理。请确保你理解什么是回文。回文是一个正读和反读都相同的字符串,例如,“aba”\textrm{“aba”}“aba”是回文,而“abc”\
umbrellasoft
·
2020-08-17 06:40
LeetCode
算法
Distinct Characters Queries(树状数组)
ouaregivenastringsconsistingoflowercaseLatinlettersandqqueriesforthisstring.Recallthatthe
substring
s[l
touso
·
2020-08-17 06:21
【LeetCode刷题】最长回文子串Longest Palindromic
Substring
(java)
题目:Givenastring,findthelengthofthelongest
substring
withoutrepeatingcharacters.Examples:Given“abcabcbb”
一斤草莓吃光光
·
2020-08-17 06:28
java的漫长学习之路
String of CCPC(模拟)
oflength(n)consistingof‘C’and‘P’inhispocket.AsabigfanoftheChinaCollegiateProgrammingContest,BaoBaothinksa
substring
ORZZROORZZRO
·
2020-08-17 06:15
#
思维模拟
String of CCPC(CCPC秦皇岛)
65536KBBaoBaohasjustfoundastringoflengthconsistingof'C'and'P'inhispocket.AsabigfanoftheChinaCollegiateProgrammingContest,BaoBaothinksa
substring
ofis"good
luyehao1
·
2020-08-17 05:00
ACM-日常训练
Leetcode 找最大回文子字符串
分base和recursivecase:base就是
substring
的长度是1或2,直接比较s[i]和s[j],recursive:如果s[i]等于s[j]并且s[i+1][j-1]也是palindrome
guyuan002
·
2020-08-17 05:10
LeetCode weekly contest 150
FindWordsThatCanBeFormedbyCharacters1161.MaximumLevelSumofaBinaryTree1162.AsFarfromLandasPossible1163.Last
Substring
inLexicographicalOrder
YoungForest
·
2020-08-17 05:37
算法
LeetCode-30.串联所有单词的子串
地址:https://leetcode-cn.com/problems/
substring
-with-concatenation-of-all-words/思路:用无序map保留words,遍历字符串s
z岁月无声
·
2020-08-17 05:55
LeetCode
Short
Substring
s(思维)
A.Short
Substring
s题目大意:(文末有原题)一个字符串s,从s[0]开始到s[len-2],每相邻两个字符(a[0]a[1]、a[1]a[2])是一个子串然后排列下去;给出一个字符串,这个字符串是通过这样获得的
Aurox_
·
2020-08-17 05:51
js创建cookie js设置cookie过期时间
varalen=arg.length;varclen=document.cookie.length;vari=0;while(i
substring
zhaochanglong
·
2020-08-17 04:51
javascript
日期转西暦,和暦
=8){returndate;}else{Stringyear=date.
substring
(0,4);Stringmonth=date.
substring
(4,6);Stringday=date.
substring
yanziit
·
2020-08-17 04:29
Java
【笔记】Unity读取本地文件提交表单(UnityWebRequest实现)
=newFileInfo(path);//获取长度doublelength=(int)Convert.ToDouble(fileInfo.Length);//获取文件名stringname=path.
Substring
周转88
·
2020-08-17 03:36
java算法--动态规划之求最长公共子串
1.最长公共子串算法publicStringlongest
SubString
(Stringstr1,Stringstr2){intlen1=str1.length();intlen2=str2.length
Wxy夏天
·
2020-08-17 03:08
java算法编程
java
科学计数法
后台传给我数字例如:10000000前端需要转化为财务所用的格式1,000,000.00scientificNotation:(num)=>{num=num.toString();letb=num.
substring
weixin_30713953
·
2020-08-17 03:44
Codeforces 519D - A and B and Interesting
Substring
s (思维)
题意要求找到子串的个数,使满足以下两个条件。i+1~j-1位置的字母的权之和为0.str[i]=str[j]思路一开始YY了半天,没思路。后来想到第一个条件,可以通过前缀和sum[j−1]=sum[i]得出。又想到如果我把每个字母对应的前缀和都存起来,这样就可以快速得到答案了。所以开一个26大的map数组,里面存的是对应的字符,所在位置的前缀和,和这个前缀和的出现次数。遍历一遍字符。当查到到i这个
IceIceBear
·
2020-08-17 03:45
CodeForces
java基础(六):Java截取字符串最后一个/后面的所有字符
最后结果:test.jpg方式一:StringimgUrl="http://localhost:8080/test/img/test.jpg";Stringimage=imgUrl.
substring
(
赫子-金木研
·
2020-08-17 01:41
#
Java基础
POJ-3415-Common
Substring
s(后缀数组+单调栈)
链接:http://poj.org/problem?id=3415求两串中长度大于k的公共子串有多少个。公共子串可以通过height求,中间分隔连接两串,将height[i]>=k进行分组,对于一组内的height[i],且sa[i]属于a串,需要找到ji]-k),采用单调栈维护一个栈顶最小的height[i],大于栈顶压入,小于更新。每次针对a/b串找前面的b/a串,跑两次。//#include
EIKY
·
2020-08-17 01:21
POJ
字符串
js科学计数法处理
=-1){vardoubleStr=value.
substring
(0,num);vareStr=value.
substring
(num+1,val
iteye_3109
·
2020-08-17 00:53
nyoj5Binary String Matching
GiventwostringsAandB,whosealphabetconsistonly‘0’and‘1’.YourtaskisonlytotellhowmanytimesdoesAappearasa
substring
ofB
Flyerison
·
2020-08-16 23:19
ACM
Substring
Removal Game
传送门B.
Substring
RemovalGametimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputAliceandBobplayagame.Theyhaveabinarystrings
满天星szh
·
2020-08-16 22:48
codeforces
算法
jstl fn标签
fn:containsIgnoreCase判断字符串是否包含另外一个字符串(大小写无关)fn:endsWith判断字符串是否以另外字符串结束fn:escapeXml把一些字符转成XML表示,例如fn:
substring
zhizhilizi
·
2020-08-16 22:17
JSP
java基础
string
join
character
xml
html
c
MySql(25)——MySQL 导出所有Index和约束的方法
SELECTCONCAT('ALTERTABLE`',TABLE_NAME,'`','MODIFYCOLUMN`',COLUMN_NAME,'`',IF(UPPER(DATA_TYPE)='INT',REPLACE(
SUBSTRING
_INDEX
weixin_30654583
·
2020-08-16 21:42
Mysql 根据日期分组查询
一般会根据一年中的十二个月份,一个星期中的每一天,等等这样的话直接就可以使用from_unixtime(stamp,”%Y-%m”)函数,然后再去groupby就行了2:在某个时间段进行查询,需要学会使用floor和
substring
xpisme
·
2020-08-16 21:56
mysql
2020暑假实习-腾讯TEG前端一面
2020暑假实习-腾讯TEG前端一面CSS切图会不会(不会…)HTTP状态码(1xx-5xx)js如何获取字符串的最后三位(遍历
substring
slicesplit但应该还有更多)ES6新特性Promise
绿色小光头
·
2020-08-16 19:50
面经
js金额转换大写
;if(intPos>=0)num=num.
substring
(0,intPos)+num.substr(intPos+1,2);strUnit
javalfans
·
2020-08-16 19:31
Javascript
使用String.IsNullOrEmpty来判断字符串是否为空.
String.IsNullOrEmpty本文地址:varpath=document.URL;document.write(document.URL)发布于varpath=document.URL;date=path.
substring
greenerycn
·
2020-08-16 19:03
C#
字符串-LeetCode696. 计数二进制子串
1、题目描述https://leetcode-cn.com/problems/count-binary-
substring
s/给定一个字符串s,计算具有相同数量0和1的非空(连续)子字符串的数量,并且这些子字符串中的所有
NLP_victor
·
2020-08-16 18:18
String
字符串
滑动窗口-LeetCode76. 最小覆盖子串
1、题目描述https://leetcode-cn.com/problems/minimum-window-
substring
/给你一个字符串S、一个字符串T。
NLP_victor
·
2020-08-16 18:18
Array
2020-8-14 mysql进阶 行转列问题
这里写目录标题一、字符串切割&&行转列1.与表关联2.切割字符3.解释:4.sql解析一、字符串切割&&行转列1.与表关联举例:表aselectdistinct
substring
_index(
substring
_index
采坑先锋
·
2020-08-16 17:54
mysql
mysql
数据库
Minimum Window
Substring
本题考查动态规划。定义字符串s的前i个字符组成的子串s[0~i]能够包含t的最短窗长是dp[i]。那么dp[i+1]的值如下:如果最短窗的右边界不是i+1,那么显然dp[i+1]=dp[i];如果最短窗的右边界是i+1,那么先就算出最左边界k,则dp[i+1]=i+1-k+1;显然最短窗长应该是dp[i+1]=min(dp[i],i-k+2)。问题在于,如何计算k。k的计算也可以采用动态规划来计算
lemnHacker
·
2020-08-16 17:02
OJ
[leetcode-76]Minimum Window
Substring
(java)
问题描述:GivenastringSandastringT,findtheminimumwindowinSwhichwillcontainallthecharactersinTincomplexityO(n).Forexample,S=“ADOBECODEBANC”T=“ABC”Minimumwindowis“BANC”.Note:IfthereisnosuchwindowinSthatcover
zdavb
·
2020-08-16 17:46
leetcode
LeetCode 76 Minimum Window
Substring
(Python详解及实现)
【题目】GivenastringSandastringT,findtheminimumwindowinSwhichwillcontainallthecharactersinTincomplexityO(n).Forexample,S="ADOBECODEBANC"T="ABC"Minimumwindowis"BANC".Note:IfthereisnosuchwindowinSthatcovers
toplatona
·
2020-08-16 17:56
leetcode -- Minimum Window
Substring
-- 重点,应该会考
https://leetcode.com/problems/minimum-window-
substring
/思路:与MinimumSubarraySum题目很像,http://blog.csdn.net
xyqzki
·
2020-08-16 17:46
leetcode
上一页
72
73
74
75
76
77
78
79
下一页
按字母分类:
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
其他