
算法
文章平均质量分 78
阿凡达的忧伤
先成为一名游戏编程工程师吧。
展开
-
算法查找子字符串
1.查找子字符串问题:For a given source string and a target string, you should output thefirstindex(from 0) of target string in source string.If target does not exist in source, just return-1.算法要求:输入源字...原创 2022-02-10 17:52:39 · 446 阅读 · 0 评论 -
字符串子串匹配KMP算法
private subStringIndex(source:string,target:string):number{ if(target.length>source.length||!source||!target){ return -1; } let res=-1; for(let i=0;...原创 2020-03-07 17:06:52 · 455 阅读 · 0 评论