没有合适的资源?快使用搜索试试~ 我知道了~
LeetCode判断字符串是否循环-LeetCode:LeetCode解题
共212个文件
js:203个
md:5个
html:3个
需积分: 5 0 下载量 146 浏览量
2021-07-01
05:48:58
上传
评论
收藏 127KB ZIP 举报
温馨提示
LeetCode判断字符串是否循环 LeetCode解题思路总结 1.两数之和 方法一:Map 1.创建一个map 2.for循环遍历nums数组 3.用target减nums[i]得到key 4.检查map里面是否有key var twoSum = function (nums, target) { var targetMap = new Map() for (var i = 0; i < nums.length; i++) { var key = target - nums[i] if (targetMap.has(key)) { return [targetMap.get(key), i] } else { targetMap.set(nums[i], i) } } } 03.无重复字符的最长子串 方法一: Set 1.创建一个set 2.使两个指针指向字符串的头部 遍历字符串,若set里面没有是s[i],则添加s[i]到set里面,并更新maxLeng 若set里面已经存在s[i],则需要删除s[j], 并且将j向后移动(j++),直到set里面不包含s[i]为止,再添加s[i
资源推荐
资源详情
资源评论
收起资源包目录
LeetCode判断字符串是否循环-LeetCode:LeetCode解题 (212个子文件)
1 0B
index.html 237B
index.html 235B
index.html 235B
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 2KB
index.js 1KB
index.js 1KB
index.js 1KB
main.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
index.js 1KB
300最长上升子序列.js 1KB
1143最长公共子序列.js 1KB
index.js 1KB
index.js 1017B
index.js 1017B
index.js 1002B
index.js 999B
index.js 999B
index.js 996B
index.js 994B
index.js 969B
index.js 969B
index.js 964B
index.js 954B
index.js 933B
15三数之和.js 914B
17最短单词距离.js 874B
650两个键.js 858B
index.js 854B
index.js 845B
index.js 845B
index.js 840B
快速.js 834B
index.js 820B
index.js 820B
index.js 769B
53最大子序和.js 767B
index.js 763B
index.js 763B
index.js 752B
376摇摆.js 750B
index.js 746B
index.js 746B
index.js 734B
index.js 713B
index.js 713B
index.js 700B
index.js 694B
index.js 694B
index.js 694B
index.js 675B
index.js 665B
index.js 661B
普通.js 650B
普通.js 650B
index.js 629B
index.js 629B
index.js 615B
index.js 613B
index.js 613B
index.js 611B
index.js 610B
index.js 610B
index.js 608B
index.js 607B
index.js 606B
index.js 605B
index.js 602B
index.js 602B
index.js 596B
index.js 594B
index.js 594B
index.js 581B
计算长度.js 581B
计算长度.js 581B
index.js 577B
1.js 576B
1.js 576B
index.js 561B
index.js 560B
index.js 560B
index.js 560B
1.js 556B
19删除倒数节点.js 555B
index.js 551B
递归.js 551B
递归.js 551B
index.js 550B
index.js 548B
冒泡.js 543B
index.js 541B
共 212 条
- 1
- 2
- 3
资源评论
weixin_38532139
- 粉丝: 5
- 资源: 911
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功