没有合适的资源?快使用搜索试试~ 我知道了~
leetcode1231c-leetcode-[removed]LeetCodeJavaScript思考(1-1312)
共107个文件
js:98个
json:3个
editorconfig:1个
需积分: 9 0 下载量 48 浏览量
2021-06-30
05:55:11
上传
评论
收藏 85KB ZIP 举报
温馨提示
leetcode 1231 c LeetCode JavaScript 解题思路(1-1312) 利用Map缓存, key = target - nums[index], val = index 类似十进制的运算, 从后面往前撸, 大于9要进一位, 麻烦的是要在链表中计算 遍历一个字符串, 如果不重复放到temp里, 比较长度 ] 设定left, right两个index, 当s[left] === s[right], 则是回文, 向外侧递增, 当 right - left > s.length - index 循环可以退出 另外pivot有两种情况, 如果s长度是偶数就没有pivot ZigZag有如下规律, 当n=3的时候Y坐标为[0,1,2,1], 当n=4的时候Y坐标为[0,1,2,3,2,1], 按照这个规律像俄罗斯方块一样累加再拼接即可 A (A) 新的循环... B F (B) (F) C E (C) (E) D (D) 处理一下正负号的情况再反转就好了 用parseInt方法处理, 数字范围在INT_MAX在 [2 ** 32 -1, -(2 ** 32)] 之间 简易
资源推荐
资源详情
资源评论
收起资源包目录
leetcode1231c-leetcode-[removed]LeetCodeJavaScript思考(1-1312) (107个子文件)
.babelrc 79B
.editorconfig 252B
.gitignore 2KB
55.jump-game.js 2KB
17.letter-combinations-of-a-phone-number.js 1KB
34.find-first-and-last-position-of-element-in-sorted-array.js 1KB
18.4-sum.js 1KB
25.reverse-nodes-in-k-group.js 1KB
72.edit-distance.js 1KB
35.search-insert-position.js 1KB
21.merge-two-sorted-lists.js 1KB
15.3-sum.js 1KB
23.merge-k-sorted-lists.js 1000B
101.symmetric-tree.js 997B
167.two-sum-ii-input-array-is-sorted.js 994B
16.3-sum-closest.js 975B
33.search-in-rotated-sorted-array.js 974B
63.unique-paths-ii.js 973B
121.best-time-to-buy-and-sell-stock.js 931B
107.binary-tree-level-order-traversal-ii.js 929B
29.divide-two-integers.js 921B
54.spiral-matrix.js 904B
12.integer-to-roman.js 880B
38.count-and-say.js 875B
40.combination-sum-ii.js 854B
4.median-of-two-sorted-arrays.js 832B
2.add-two-numbers.js 824B
19.remove-nth-node-from-end-of-list.js 823B
155.min-stack.js 813B
110.balanced-binary-tree.js 774B
48.rotate-image.js 750B
.eslintrc.js 750B
75.sort-colors.js 738B
64.minimum-path-sum.js 717B
437.path-sum-iii.js 711B
42.trapping-rain-water.js 701B
3.longest-substring-without-repeating-characters.js 699B
206.reverse-linked-list.js 695B
57.insert-interval.js 694B
14.longest-common-prefix.js 691B
47.permutations-ii.js 683B
43.multiply-strings.js 681B
83.remove-duplicates-from-sorted-list.js 678B
198.house-robber.js 660B
5.longest-palindromic-substring.js 656B
39.combination-sum.js 655B
108.convert-sorted-array-to-binary-search-tree.js 649B
67.add-binary.js 640B
160.intersection-of-two-linked-lists.js 639B
119.pascals-triangle-ii.js 626B
111.minimum-depth-of-binary-tree.js 621B
13.roman-to-integer.js 620B
226.invert-binary-tree.js 614B
69.sqrt-x.js 604B
11.container-with-most-water.js 602B
234.palindrome-linked-list.js 601B
56.merge-intervals.js 599B
104.maximum-depth-of-binary-tree.js 592B
generator.js 587B
100.same-tree.js 582B
20.valid-parentheses.js 577B
112.path-sum.js 577B
141.linked-list-cycle.js 573B
7.reverse-integer.js 567B
22.generate-parentheses.js 556B
46.permutations.js 545B
118.pascals-triangle.js 541B
66.plus-one.js 530B
49.group-anagrams.js 528B
231.power-of-two.js 519B
88.merge-sorted-array.js 511B
10.regular-expression-matching.js 499B
24.swap-nodes-in-pairs.js 492B
122.best-time-to-buy-and-sell-stock-ii.js 482B
6.zig-zag-conversion.js 480B
45.jump-game-ii.js 463B
94.binary-tree-inorder-traversal.js 462B
1.two-sum.js 456B
70.climbing-stairs.js 446B
448.find-all-numbers-disappeared-in-an-array.js 445B
62.unique-paths.js 438B
26.remove-duplicates-from-sorted-array.js 435B
50.pow-x-n.js 428B
125.valid-palindrome.js 424B
169.majority-element.js 421B
8.string-to-integer-atoi.js 394B
41.first-missing-positive.js 383B
190.reverse-bits.js 383B
53.maximum-subarray.js 381B
268.missing-number.js 375B
189.rotate-array.js 345B
172.factorial-trailing-zeroes.js 344B
287.find-the-duplicate-number.js 333B
58.length-of-last-word.js 331B
171.excel-sheet-column-number.js 326B
27.remove-element.js 318B
28.implement-str-str.js 318B
136.single-number.js 313B
168.excel-sheet-column-title.js 305B
191.number-of-1-bits.js 270B
共 107 条
- 1
- 2
资源评论
weixin_38550334
- 粉丝: 2
- 资源: 952
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功