Skip to content

Commit 61f81b9

Browse files
committed
增加链接配置
1 parent c231b9c commit 61f81b9

File tree

1,340 files changed

+1520
-1518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,340 files changed

+1520
-1518
lines changed

docs/0000-01-sliding-window.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ while (right < s.size()) {
7070

7171
== 常见题目
7272

73-
. https://leetcode.com/problems/subarray-sum-equals-k/[Subarray Sum Equals K - LeetCode]
73+
. https://leetcode.com/problems/subarray-sum-equals-k/[Subarray Sum Equals K - LeetCode^]
7474

7575

7676

docs/0000-02-two-pointer.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Dutch National Flag Problem (medium)
4545

4646
== 参考资料
4747

48-
. http://joshuablog.herokuapp.com/Two-Pointer%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93.html[Two Pointer问题总结 | Joshua]
48+
. http://joshuablog.herokuapp.com/Two-Pointer%E9%97%AE%E9%A2%98%E6%80%BB%E7%BB%93.html[Two Pointer问题总结^]
4949
. https://leetcode.cn/problems/middle-of-the-linked-list/solutions/165152/kuai-man-zhi-zhen-zhu-yao-zai-yu-diao-shi-by-liwei/[876. 链表的中间结点 - 注意链表长度为偶数时,返回第 2 个结点的细节^]
5050
. https://leetcode.cn/problems/middle-of-the-linked-list/solutions/1646119/by-jyd-aphd/[876. 链表的中间结点 - 双指针,清晰图解^]
5151
. https://leetcode.cn/problems/linked-list-cycle/solutions/175734/yi-wen-gao-ding-chang-jian-de-lian-biao-wen-ti-h-2/[141. 环形链表 - 一文搞定常见的链表问题^]

docs/0000-15-backtrack.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
== 参考资料
1616

17-
. https://en.wikipedia.org/wiki/Backtracking[Backtracking - Wikipedia]
18-
. https://www.geeksforgeeks.org/backtracking-algorithms/[Backtracking Algorithms - GeeksforGeeks]
17+
. https://en.wikipedia.org/wiki/Backtracking[Backtracking - Wikipedia^]
18+
. https://www.geeksforgeeks.org/backtracking-algorithms/[Backtracking Algorithms^]
1919
. https://leetcode.cn/problems/permutation-sequence/solutions/10642/hui-su-jian-zhi-python-dai-ma-java-dai-ma-by-liwei/[60. 排列序列 - 深度优先遍历 + 剪枝、有序数组模拟^]
2020
. https://leetcode.cn/problems/permutations/solutions/9914/hui-su-suan-fa-python-dai-ma-java-dai-ma-by-liweiw/[从全排列问题开始理解“回溯搜索”算法(深度优先遍历 + 状态重置 + 剪枝)^]
2121
. https://leetcode.cn/problems/n-queens/solutions/2566744/dai-ma-sui-xiang-lu-leetcode51nhuang-hou-hcat/[51. N 皇后 - 代码随想录^]

docs/0001-two-sum.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0001-two-sum]
22
= 1. Two Sum
33

4-
https://leetcode.com/problems/two-sum/[LeetCode - Two Sum]
4+
https://leetcode.com/problems/two-sum/[LeetCode - Two Sum^]
55

66
Given an array of integers, return *indices* of the two numbers such that they add up to a specific target.
77

docs/0002-add-two-numbers.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0002-add-two-numbers]
22
= 2. Add Two Numbers
33

4-
https://leetcode.com/problems/add-two-numbers/[LeetCode - Add Two Numbers]
4+
https://leetcode.com/problems/add-two-numbers/[LeetCode - Add Two Numbers^]
55

66
You are given two *non-empty* linked lists representing two non-negative integers. The digits are stored in *reverse order* and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
77

docs/0003-longest-substring-without-repeating-characters.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[#0003-longest-substring-without-repeating-characters]
33
= 3. Longest Substring Without Repeating Characters
44

5-
https://leetcode.com/problems/longest-substring-without-repeating-characters/[LeetCode - Longest Substring Without Repeating Characters]
5+
https://leetcode.com/problems/longest-substring-without-repeating-characters/[LeetCode - Longest Substring Without Repeating Characters^]
66

77
Given a string, find the length of the *longest substring* without repeating characters.
88

docs/0004-median-of-two-sorted-arrays.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0004-median-of-two-sorted-arrays]
22
= 4. Median of Two Sorted Arrays
33

4-
https://leetcode.com/problems/median-of-two-sorted-arrays/[LeetCode - Median of Two Sorted Arrays]
4+
https://leetcode.com/problems/median-of-two-sorted-arrays/[LeetCode - Median of Two Sorted Arrays^]
55

66
There are two sorted arrays *nums1* and *nums2* of size m and n respectively.
77

docs/0005-longest-palindromic-substring.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0005-longest-palindromic-substring]
22
= 5. Longest Palindromic Substring
33

4-
https://leetcode.com/problems/longest-palindromic-substring/[LeetCode - Longest Palindromic Substring]
4+
https://leetcode.com/problems/longest-palindromic-substring/[LeetCode - Longest Palindromic Substring^]
55

66
Given a string *s*, find the longest palindromic substring in *s*. You may assume that the maximum length of *s* is 1000.
77

@@ -28,7 +28,7 @@ Given a string *s*, find the longest palindromic substring in *s*. You may assum
2828

2929
image::images/0005-01.png[]
3030

31-
没想到,竟然存在时间复杂度为 O(n) 的算法:Manacher's Algorithm。在维基百科上有解释: https://en.wikipedia.org/wiki/Longest_palindromic_substring[Longest palindromic substring - Wikipedia]。回头研究研究再补充!
31+
没想到,竟然存在时间复杂度为 O(n) 的算法:Manacher's Algorithm。在维基百科上有解释: https://en.wikipedia.org/wiki/Longest_palindromic_substring[Longest palindromic substring - Wikipedia^]。回头研究研究再补充!
3232

3333
另外,这道题还可以练手动态规划。
3434

docs/0006-zigzag-conversion.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0006-zigzag-conversion]
22
= 6. ZigZag Conversion
33

4-
https://leetcode.com/problems/zigzag-conversion/[LeetCode - ZigZag Conversion]
4+
https://leetcode.com/problems/zigzag-conversion/[LeetCode - ZigZag Conversion^]
55

66
The string `"PAYPALISHIRING"` is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
77

docs/0007-reverse-integer.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0007-reverse-integer]
22
= 7. Reverse Integer
33

4-
https://leetcode.com/problems/reverse-integer/[LeetCode - Reverse Integer]
4+
https://leetcode.com/problems/reverse-integer/[LeetCode - Reverse Integer^]
55

66
Given a 32-bit signed integer, reverse digits of an integer.
77

docs/0008-string-to-integer-atoi.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0008-string-to-integer-atoi]
22
= 8. String to Integer (atoi)
33

4-
https://leetcode.com/problems/string-to-integer-atoi/[LeetCode - String to Integer (atoi)]
4+
https://leetcode.com/problems/string-to-integer-atoi/[LeetCode - String to Integer (atoi)^]
55

66
Implement `atoi` which converts a string to an integer.
77

docs/0009-palindrome-number.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0009-palindrome-number]
22
= 9. Palindrome Number
33

4-
https://leetcode.com/problems/palindrome-number/[LeetCode - Palindrome Number]
4+
https://leetcode.com/problems/palindrome-number/[LeetCode - Palindrome Number^]
55

66
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
77

@@ -44,5 +44,5 @@ include::{sourcedir}/_0009_PalindromeNumber.java[tag=answer]
4444

4545
== 参考资料
4646

47-
. https://leetcode-cn.com/problems/palindrome-number/solution/hui-wen-shu-by-leetcode/[回文数 - 回文数 - 力扣(LeetCode)]
47+
. https://leetcode-cn.com/problems/palindrome-number/solution/hui-wen-shu-by-leetcode/[回文数 - 回文数 - 力扣(LeetCode)^]
4848

docs/0010-regular-expression-matching.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0010-regular-expression-matching]
22
= 10. Regular Expression Matching
33

4-
https://leetcode.com/problems/regular-expression-matching/[LeetCode - Regular Expression Matching]
4+
https://leetcode.com/problems/regular-expression-matching/[LeetCode - Regular Expression Matching^]
55

66
Given an input string (`s`) and a pattern (`p`), implement regular expression matching with support for `'.'` and `'*'`.
77

docs/0011-container-with-most-water.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0011-container-with-most-water]
22
= 11. Container With Most Water
33

4-
https://leetcode.com/problems/container-with-most-water/[LeetCode - Container With Most Water]
4+
https://leetcode.com/problems/container-with-most-water/[LeetCode - Container With Most Water^]
55

66
Given _n_ non-negative integers _a~1~_, _a~2~_, ..., _a~n ~_, where each represents a point at coordinate (_i_, _a~i~_). _n_ vertical lines are drawn such that the two endpoints of line _i_ is at (_i_, _a~i~_) and (_i_, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
77

@@ -37,4 +37,4 @@ include::{sourcedir}/_0011_ContainerWithMostWater.java[tag=answer]
3737

3838
== 参考资料
3939

40-
. https://leetcode-cn.com/problems/container-with-most-water/solution/sheng-zui-duo-shui-de-rong-qi-by-leetcode-solution/[盛最多水的容器 - 盛最多水的容器 - 力扣(LeetCode)]
40+
. https://leetcode-cn.com/problems/container-with-most-water/solution/sheng-zui-duo-shui-de-rong-qi-by-leetcode-solution/[盛最多水的容器 - 盛最多水的容器 - 力扣(LeetCode)^]

docs/0012-integer-to-roman.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0012-integer-to-roman]
22
= 12. Integer to Roman
33

4-
https://leetcode.com/problems/integer-to-roman/[LeetCode - Integer to Roman]
4+
https://leetcode.com/problems/integer-to-roman/[LeetCode - Integer to Roman^]
55

66
Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D` and `M`.
77

docs/0013-roman-to-integer.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0013-roman-to-integer]
22
= 13. Roman to Integer
33

4-
https://leetcode.com/problems/roman-to-integer/[LeetCode - Roman to Integer]
4+
https://leetcode.com/problems/roman-to-integer/[LeetCode - Roman to Integer^]
55

66
Roman numerals are represented by seven different symbols: `I`, `V`, `X`, `L`, `C`, `D` and `M`.
77

@@ -87,5 +87,5 @@ include::{sourcedir}/_0013_RomanToInteger.java[tag=answer]
8787

8888
== 参考资料
8989

90-
. https://leetcode-cn.com/problems/roman-to-integer/solution/yong-shi-9993nei-cun-9873jian-dan-jie-fa-by-donesp/[用时 99.93%,内存98.73%,简单解法 - 罗马数字转整数 - 力扣(LeetCode)]
90+
. https://leetcode-cn.com/problems/roman-to-integer/solution/yong-shi-9993nei-cun-9873jian-dan-jie-fa-by-donesp/[用时 99.93%,内存98.73%,简单解法 - 罗马数字转整数 - 力扣(LeetCode)^]
9191

docs/0014-longest-common-prefix.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0014-longest-common-prefix]
22
= 14. Longest Common Prefix
33

4-
https://leetcode.com/problems/longest-common-prefix/[LeetCode - Longest Common Prefix]
4+
https://leetcode.com/problems/longest-common-prefix/[LeetCode - Longest Common Prefix^]
55

66
Write a function to find the longest common prefix string amongst an array of strings.
77

docs/0015-3sum.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0015-3sum]
22
= 15. 3Sum
33

4-
https://leetcode.com/problems/3sum/[LeetCode - 3Sum]
4+
https://leetcode.com/problems/3sum/[LeetCode - 3Sum^]
55

66
Given an array `nums` of _n_ integers, are there elements _a_, _b_, _c_ in `nums` such that _a_ + _b_ + _c_ = 0? Find all unique triplets in the array which gives the sum of zero.
77

@@ -34,5 +34,5 @@ include::{sourcedir}/_0015_3Sum.java[tag=answer]
3434

3535
== 参考资料
3636

37-
. https://leetcode-cn.com/problems/3sum/solution/three-sum-ti-jie-by-wonderful611/[三数之和题解 - 三数之和 - 力扣(LeetCode)]
37+
. https://leetcode-cn.com/problems/3sum/solution/three-sum-ti-jie-by-wonderful611/[三数之和题解 - 三数之和 - 力扣(LeetCode)^]
3838

docs/0016-3sum-closest.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0016-3sum-closest]
22
= 16. 3Sum Closest
33

4-
https://leetcode.com/problems/3sum-closest/[LeetCode - 3Sum Closest]
4+
https://leetcode.com/problems/3sum-closest/[LeetCode - 3Sum Closest^]
55

66
Given an array `nums` of _n_ integers and an integer `target`, find three integers in `nums` such that the sum is closest to `target`. Return the sum of the three integers. You may assume that each input would have exactly one solution.
77

docs/0017-letter-combinations-of-a-phone-number.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0017-letter-combinations-of-a-phone-number]
22
= 17. Letter Combinations of a Phone Number
33

4-
https://leetcode.com/problems/letter-combinations-of-a-phone-number/[LeetCode - Letter Combinations of a Phone Number]
4+
https://leetcode.com/problems/letter-combinations-of-a-phone-number/[LeetCode - Letter Combinations of a Phone Number^]
55

66
Given a string containing digits from `2-9` inclusive, return all possible letter combinations that the number could represent.
77

@@ -33,4 +33,4 @@ include::{sourcedir}/_0017_LetterCombinationsOfAPhoneNumber.java[tag=answer]
3333

3434
== 参考资料
3535

36-
. https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/solution/dian-hua-hao-ma-de-zi-mu-zu-he-by-leetcode/[电话号码的字母组合 - 电话号码的字母组合 - 力扣(LeetCode)]
36+
. https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/solution/dian-hua-hao-ma-de-zi-mu-zu-he-by-leetcode/[电话号码的字母组合 - 电话号码的字母组合 - 力扣(LeetCode)^]

docs/0018-4sum.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0018-4sum]
22
= 18. 4Sum
33

4-
https://leetcode.com/problems/4sum/[LeetCode - 4Sum]
4+
https://leetcode.com/problems/4sum/[LeetCode - 4Sum^]
55

66
Given an array `nums` of _n_ integers and an integer `target`, are there elements _a_, _b_, _c_, and _d_ in `nums` such that _a_ + _b_ + _c_ + _d_ = `target`? Find all unique quadruplets in the array which gives the sum of `target`.
77

docs/0019-remove-nth-node-from-end-of-list.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0019-remove-nth-node-from-end-of-list]
22
= 19. Remove Nth Node From End of List
33

4-
https://leetcode.com/problems/remove-nth-node-from-end-of-list/[LeetCode - Remove Nth Node From End of List]
4+
https://leetcode.com/problems/remove-nth-node-from-end-of-list/[LeetCode - Remove Nth Node From End of List^]
55

66
Given a linked list, remove the _n_-th node from the end of list and return its head.
77

@@ -36,4 +36,4 @@ include::{sourcedir}/_0019_RemoveNthNodeFromEndOfList.java[tag=answer]
3636

3737
== 参考资料
3838

39-
. https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/solution/shan-chu-lian-biao-de-dao-shu-di-nge-jie-dian-by-l/[删除链表的倒数第N个节点 - 删除链表的倒数第N个节点 - 力扣(LeetCode)]
39+
. https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/solution/shan-chu-lian-biao-de-dao-shu-di-nge-jie-dian-by-l/[删除链表的倒数第N个节点 - 删除链表的倒数第N个节点 - 力扣(LeetCode)^]

docs/0020-valid-parentheses.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0020-valid-parentheses]
22
= 20. Valid Parentheses
33

4-
https://leetcode.com/problems/valid-parentheses/[LeetCode - Valid Parentheses]
4+
https://leetcode.com/problems/valid-parentheses/[LeetCode - Valid Parentheses^]
55

66
Given a string containing just the characters `'('`, `')'`, `'{'`, `'}'`, `'['` and `']'`, determine if the input string is valid.
77

docs/0021-merge-two-sorted-lists.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0021-merge-two-sorted-lists]
22
= 21. Merge Two Sorted Lists
33

4-
https://leetcode.com/problems/merge-two-sorted-lists/[LeetCode - Merge Two Sorted Lists]
4+
https://leetcode.com/problems/merge-two-sorted-lists/[LeetCode - Merge Two Sorted Lists^]
55

66
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
77

docs/0022-generate-parentheses.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0022-generate-parentheses]
22
= 22. Generate Parentheses
33

4-
https://leetcode.com/problems/generate-parentheses/[LeetCode - Generate Parentheses]
4+
https://leetcode.com/problems/generate-parentheses/[LeetCode - Generate Parentheses^]
55

66
Given _n_ pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
77

@@ -42,4 +42,4 @@ include::{sourcedir}/_0022_GenerateParentheses.java[tag=answer]
4242

4343
== 参考资料
4444

45-
. https://leetcode-cn.com/problems/generate-parentheses/solution/hui-su-suan-fa-by-liweiwei1419/[回溯算法(深度优先遍历)+ 广度优先遍历 + 动态规划 - 括号生成 - 力扣(LeetCode)]
45+
. https://leetcode-cn.com/problems/generate-parentheses/solution/hui-su-suan-fa-by-liweiwei1419/[回溯算法(深度优先遍历)+ 广度优先遍历 + 动态规划 - 括号生成 - 力扣(LeetCode)^]

docs/0023-merge-k-sorted-lists.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0023-merge-k-sorted-lists]
22
= 23. Merge k Sorted Lists
33

4-
https://leetcode.com/problems/merge-k-sorted-lists/[LeetCode - Merge k Sorted Lists]
4+
https://leetcode.com/problems/merge-k-sorted-lists/[LeetCode - Merge k Sorted Lists^]
55

66
Merge _k_ sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
77

docs/0024-swap-nodes-in-pairs.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0024-swap-nodes-in-pairs]
22
= 24. Swap Nodes in Pairs
33

4-
https://leetcode.com/problems/swap-nodes-in-pairs/[LeetCode - Swap Nodes in Pairs]
4+
https://leetcode.com/problems/swap-nodes-in-pairs/[LeetCode - Swap Nodes in Pairs^]
55

66
Given a linked list, swap every two adjacent nodes and return its head.
77

@@ -18,7 +18,7 @@ Given 1->2->3->4, you should return the list as 2->1->4->3.
1818

1919
== 参考资料
2020

21-
. https://leetcode-cn.com/problems/swap-nodes-in-pairs/solution/liang-liang-jiao-huan-lian-biao-zhong-de-jie-di-19/[两两交换链表中的节点 - 两两交换链表中的节点 - 力扣(LeetCode)]
21+
. https://leetcode-cn.com/problems/swap-nodes-in-pairs/solution/liang-liang-jiao-huan-lian-biao-zhong-de-jie-di-19/[两两交换链表中的节点 - 两两交换链表中的节点 - 力扣(LeetCode)^]
2222

2323
Given a linked list, swap every two adjacent nodes and return its head.
2424

docs/0025-reverse-nodes-in-k-group.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[#0025-reverse-nodes-in-k-group]
22
= 25. Reverse Nodes in k-Group
33

4-
https://leetcode.com/problems/reverse-nodes-in-k-group/[LeetCode - Reverse Nodes in k-Group]
4+
https://leetcode.com/problems/reverse-nodes-in-k-group/[LeetCode - Reverse Nodes in k-Group^]
55

66
Given a linked list, reverse the nodes of a linked list _k_ at a time and return its modified list.
77

docs/0026-remove-duplicates-from-sorted-array.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[#0026-remove-duplicates-from-sorted-array]
22
= 26. Remove Duplicates from Sorted Array
33

4-
https://leetcode.com/problems/remove-duplicates-from-sorted-array/[LeetCode - Remove Duplicates from Sorted Array]
4+
https://leetcode.com/problems/remove-duplicates-from-sorted-array/[LeetCode - Remove Duplicates from Sorted Array^]
55

6-
Given a sorted array _nums_, remove the duplicates https://en.wikipedia.org/wiki/In-place_algorithm[*in-place*] such that each element appear only _once_ and return the new length.
6+
Given a sorted array _nums_, remove the duplicates https://en.wikipedia.org/wiki/In-place_algorithm[*in-place*^] such that each element appear only _once_ and return the new length.
77

8-
Do not allocate extra space for another array, you must do this by *modifying the input array https://en.wikipedia.org/wiki/In-place_algorithm[in-place]* with O(1) extra memory.
8+
Do not allocate extra space for another array, you must do this by *modifying the input array https://en.wikipedia.org/wiki/In-place_algorithm[in-place^]* with O(1) extra memory.
99

1010
*Example 1:*
1111

docs/0027-remove-element.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[#0027-remove-element]
22
= 27. Remove Element
33

4-
https://leetcode.com/problems/remove-element/[LeetCode - Remove Element]
4+
https://leetcode.com/problems/remove-element/[LeetCode - Remove Element^]
55

6-
Given an array _nums_ and a value _val_, remove all instances of that value https://en.wikipedia.org/wiki/In-place_algorithm[*in-place*] and return the new length.
6+
Given an array _nums_ and a value _val_, remove all instances of that value https://en.wikipedia.org/wiki/In-place_algorithm[*in-place*^] and return the new length.
77

8-
Do not allocate extra space for another array, you must do this by *modifying the input array https://en.wikipedia.org/wiki/In-place_algorithm[in-place]* with O(1) extra memory.
8+
Do not allocate extra space for another array, you must do this by *modifying the input array https://en.wikipedia.org/wiki/In-place_algorithm[in-place^]* with O(1) extra memory.
99

1010
The order of elements can be changed. It doesn't matter what you leave beyond the new length.
1111

docs/0028-implement-strstr.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[#0028-implement-strstr]
22
= 28. Implement strStr()
33

4-
https://leetcode.com/problems/implement-strstr/[LeetCode - Implement strStr()]
4+
https://leetcode.com/problems/implement-strstr/[LeetCode - Implement strStr()^]
55

6-
Implement http://www.cplusplus.com/reference/cstring/strstr/[strStr()].
6+
Implement http://www.cplusplus.com/reference/cstring/strstr/[strStr()^].
77

88
Return the index of the first occurrence of needle in haystack, or *-1* if needle is not part of haystack.
99

@@ -27,7 +27,7 @@ Return the index of the first occurrence of needle in haystack, or *-1* if needl
2727

2828
What should we return when `needle` is an empty string? This is a great question to ask during an interview.
2929

30-
For the purpose of this problem, we will return 0 when `needle` is an empty string. This is consistent to C's http://www.cplusplus.com/reference/cstring/strstr/[strstr()] and Java's https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#indexOf(java.lang.String)[indexOf()].
30+
For the purpose of this problem, we will return 0 when `needle` is an empty string. This is consistent to C's http://www.cplusplus.com/reference/cstring/strstr/[strstr()] and Java's https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#indexOf(java.lang.String)[indexOf()^].
3131

3232
== 解题分析
3333

0 commit comments

Comments
 (0)