Skip to content

Commit 1b73952

Browse files
committed
add macros to subs
1 parent 3fc86d0 commit 1b73952

File tree

1,032 files changed

+2185
-2185
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,032 files changed

+2185
-2185
lines changed

docs/0001-two-sum.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Given an array of integers, return *indices* of the two numbers such that they a
77
You may assume that each input would have *_exactly_* one solution, and you may not use the _same_ element twice.
88

99
.Example:
10-
[subs="verbatim,quotes"]
10+
[subs="verbatim,quotes,macros"]
1111
----
1212
Given nums = [2, 7, 11, 15], target = 9,
1313

docs/0002-add-two-numbers.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You are given two *non-empty* linked lists representing two non-negative integer
77
You may assume the two numbers do not contain any leading zero, except the number 0 itself.
88

99
.Example:
10-
[subs="verbatim,quotes"]
10+
[subs="verbatim,quotes,macros"]
1111
----
1212
*Input:* (2 -> 4 -> 3) + (5 -> 6 -> 4)
1313
*Output:* 7 -> 0 -> 8

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Given a string, find the length of the *longest substring* without repeating cha
66

77

88
.Example 1:
9-
[subs="verbatim,quotes"]
9+
[subs="verbatim,quotes,macros"]
1010
----
1111
*Input:* "abcabcbb"
1212
*Output:* 3
@@ -15,7 +15,7 @@ Given a string, find the length of the *longest substring* without repeating cha
1515

1616

1717
.Example 2:
18-
[subs="verbatim,quotes"]
18+
[subs="verbatim,quotes,macros"]
1919
----
2020
*Input:* "bbbbb"
2121
*Output:* 1
@@ -24,7 +24,7 @@ Given a string, find the length of the *longest substring* without repeating cha
2424

2525

2626
.Example 3:
27-
[subs="verbatim,quotes"]
27+
[subs="verbatim,quotes,macros"]
2828
----
2929
*Input:* "pwwkew"
3030
*Output:* 3

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Find the median of the two sorted arrays. The overall run time complexity should
99
You may assume *nums1* and *nums2* cannot be both empty.
1010

1111
.Example 1:
12-
[subs="verbatim,quotes"]
12+
[subs="verbatim,quotes,macros"]
1313
----
1414
nums1 = [1, 3]
1515
nums2 = [2]
@@ -18,7 +18,7 @@ The median is 2.0
1818
----
1919

2020
.Example 2:
21-
[subs="verbatim,quotes"]
21+
[subs="verbatim,quotes,macros"]
2222
----
2323
nums1 = [1, 2]
2424
nums2 = [3, 4]

docs/0005-longest-palindromic-substring.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ https://leetcode.com/problems/longest-palindromic-substring/[LeetCode - Longest
55
Given a string *s*, find the longest palindromic substring in *s*. You may assume that the maximum length of *s* is 1000.
66

77
.Example 1:
8-
[subs="verbatim,quotes"]
8+
[subs="verbatim,quotes,macros"]
99
----
1010
*Input:* "babad"
1111
*Output:* "bab"
1212
*Note:* "aba" is also a valid answer.
1313
----
1414

1515
.Example 2:
16-
[subs="verbatim,quotes"]
16+
[subs="verbatim,quotes,macros"]
1717
----
1818
*Input:* "cbbd"
1919
*Output:* "bb"

docs/0006-zigzag-conversion.adoc

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://leetcode.com/problems/zigzag-conversion/[LeetCode - ZigZag Conversion]
44

55
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)
66

7-
[subs="verbatim,quotes"]
7+
[subs="verbatim,quotes,macros"]
88
----
99
P A H N
1010
A P L S I I G
@@ -15,21 +15,21 @@ And then read line by line: `"PAHNAPLSIIGYIR"`
1515

1616
Write the code that will take a string and make this conversion given a number of rows:
1717

18-
[subs="verbatim,quotes"]
18+
[subs="verbatim,quotes,macros"]
1919
----
2020
string convert(string s, int numRows);
2121
----
2222

2323
.Example 1:
24-
[subs="verbatim,quotes"]
24+
[subs="verbatim,quotes,macros"]
2525
----
2626
*Input:* s = "PAYPALISHIRING", numRows = 3
2727
*Output:* "PAHNAPLSIIGYIR"
2828
2929
----
3030

3131
.Example 2:
32-
[subs="verbatim,quotes"]
32+
[subs="verbatim,quotes,macros"]
3333
----
3434
*Input:* s = "PAYPALISHIRING", numRows = 4
3535
*Output:* "PINALSIGYAHRPI"

docs/0007-reverse-integer.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ https://leetcode.com/problems/reverse-integer/[LeetCode - Reverse Integer]
55
Given a 32-bit signed integer, reverse digits of an integer.
66

77
.Example 1:
8-
[subs="verbatim,quotes"]
8+
[subs="verbatim,quotes,macros"]
99
----
1010
*Input:* 123
1111
*Output:* 321
1212
----
1313

1414
.Example 2:
15-
[subs="verbatim,quotes"]
15+
[subs="verbatim,quotes,macros"]
1616
----
1717
*Input:* -123
1818
*Output:* -321
1919
----
2020

2121
.Example 3:
22-
[subs="verbatim,quotes"]
22+
[subs="verbatim,quotes,macros"]
2323
----
2424
*Input:* 120
2525
*Output:* 21

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ If no valid conversion could be performed, a zero value is returned.
1919
2020
2121
.Example 1:
22-
[subs="verbatim,quotes"]
22+
[subs="verbatim,quotes,macros"]
2323
----
2424
*Input:* "42"
2525
*Output:* 42
2626
----
2727

2828
.Example 2:
29-
[subs="verbatim,quotes"]
29+
[subs="verbatim,quotes,macros"]
3030
----
3131
*Input:* " -42"
3232
*Output:* -42
@@ -35,15 +35,15 @@ If no valid conversion could be performed, a zero value is returned.
3535
----
3636

3737
.Example 3:
38-
[subs="verbatim,quotes"]
38+
[subs="verbatim,quotes,macros"]
3939
----
4040
*Input:* "4193 with words"
4141
*Output:* 4193
4242
*Explanation:* Conversion stops at digit '3' as the next character is not a numerical digit.
4343
----
4444

4545
.Example 4:
46-
[subs="verbatim,quotes"]
46+
[subs="verbatim,quotes,macros"]
4747
----
4848
*Input:* "words and 987"
4949
*Output:* 0
@@ -52,7 +52,7 @@ If no valid conversion could be performed, a zero value is returned.
5252
----
5353

5454
.Example 5:
55-
[subs="verbatim,quotes"]
55+
[subs="verbatim,quotes,macros"]
5656
----
5757
*Input:* "-91283472332"
5858
*Output:* -2147483648

docs/0009-palindrome-number.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ https://leetcode.com/problems/palindrome-number/[LeetCode - Palindrome Number]
55
Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
66

77
.Example 1:
8-
[subs="verbatim,quotes"]
8+
[subs="verbatim,quotes,macros"]
99
----
1010
*Input:* 121
1111
*Output:* true
1212
----
1313

1414
.Example 2:
15-
[subs="verbatim,quotes"]
15+
[subs="verbatim,quotes,macros"]
1616
----
1717
*Input:* -121
1818
*Output:* false
1919
*Explanation:* From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.
2020
----
2121

2222
.Example 3:
23-
[subs="verbatim,quotes"]
23+
[subs="verbatim,quotes,macros"]
2424
----
2525
*Input:* 10
2626
*Output:* false

docs/0010-regular-expression-matching.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://leetcode.com/problems/regular-expression-matching/[LeetCode - Regular Ex
44

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

7-
[subs="verbatim,quotes"]
7+
[subs="verbatim,quotes,macros"]
88
----
99
'.' Matches any single character.
1010
'*' Matches zero or more of the preceding element.
@@ -21,7 +21,7 @@ The matching should cover the *entire* input string (not partial).
2121
2222
*Example 1:*
2323

24-
[subs="verbatim,quotes"]
24+
[subs="verbatim,quotes,macros"]
2525
----
2626
*Input:*
2727
s = "aa"
@@ -32,7 +32,7 @@ p = "a"
3232

3333
*Example 2:*
3434

35-
[subs="verbatim,quotes"]
35+
[subs="verbatim,quotes,macros"]
3636
----
3737
*Input:*
3838
s = "aa"
@@ -43,7 +43,7 @@ p = "a*"
4343

4444
*Example 3:*
4545

46-
[subs="verbatim,quotes"]
46+
[subs="verbatim,quotes,macros"]
4747
----
4848
*Input:*
4949
s = "ab"
@@ -54,7 +54,7 @@ p = ".*"
5454

5555
*Example 4:*
5656

57-
[subs="verbatim,quotes"]
57+
[subs="verbatim,quotes,macros"]
5858
----
5959
*Input:*
6060
s = "aab"
@@ -65,7 +65,7 @@ p = "c*a*b"
6565

6666
*Example 5:*
6767

68-
[subs="verbatim,quotes"]
68+
[subs="verbatim,quotes,macros"]
6969
----
7070
*Input:*
7171
s = "mississippi"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ image::https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/17/question_11.jpg[
1616
1717
*Example:*
1818

19-
[subs="verbatim,quotes"]
19+
[subs="verbatim,quotes,macros"]
2020
----
2121
*Input:* [1,8,6,2,5,4,8,3,7]
2222
*Output:* 49

docs/0012-integer-to-roman.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://leetcode.com/problems/integer-to-roman/[LeetCode - Integer to Roman]
44

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

7-
[subs="verbatim,quotes"]
7+
[subs="verbatim,quotes,macros"]
88
----
99
*Symbol* *Value*
1010
I 1
@@ -30,31 +30,31 @@ Given an integer, convert it to a roman numeral. Input is guaranteed to be withi
3030

3131
*Example 1:*
3232

33-
[subs="verbatim,quotes"]
33+
[subs="verbatim,quotes,macros"]
3434
----
3535
*Input:* 3
3636
*Output:* "III"
3737
----
3838

3939
*Example 2:*
4040

41-
[subs="verbatim,quotes"]
41+
[subs="verbatim,quotes,macros"]
4242
----
4343
*Input:* 4
4444
*Output:* "IV"
4545
----
4646

4747
*Example 3:*
4848

49-
[subs="verbatim,quotes"]
49+
[subs="verbatim,quotes,macros"]
5050
----
5151
*Input:* 9
5252
*Output:* "IX"
5353
----
5454

5555
*Example 4:*
5656

57-
[subs="verbatim,quotes"]
57+
[subs="verbatim,quotes,macros"]
5858
----
5959
*Input:* 58
6060
*Output:* "LVIII"
@@ -63,7 +63,7 @@ Given an integer, convert it to a roman numeral. Input is guaranteed to be withi
6363

6464
*Example 5:*
6565

66-
[subs="verbatim,quotes"]
66+
[subs="verbatim,quotes,macros"]
6767
----
6868
*Input:* 1994
6969
*Output:* "MCMXCIV"

docs/0013-roman-to-integer.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ https://leetcode.com/problems/roman-to-integer/[LeetCode - Roman to Integer]
44

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

7-
[subs="verbatim,quotes"]
7+
[subs="verbatim,quotes,macros"]
88
----
99
*Symbol* *Value*
1010
I 1
@@ -30,31 +30,31 @@ Given a roman numeral, convert it to an integer. Input is guaranteed to be withi
3030

3131
*Example 1:*
3232

33-
[subs="verbatim,quotes"]
33+
[subs="verbatim,quotes,macros"]
3434
----
3535
*Input:* "III"
3636
*Output:* 3
3737
----
3838

3939
*Example 2:*
4040

41-
[subs="verbatim,quotes"]
41+
[subs="verbatim,quotes,macros"]
4242
----
4343
*Input:* "IV"
4444
*Output:* 4
4545
----
4646

4747
*Example 3:*
4848

49-
[subs="verbatim,quotes"]
49+
[subs="verbatim,quotes,macros"]
5050
----
5151
*Input:* "IX"
5252
*Output:* 9
5353
----
5454

5555
*Example 4:*
5656

57-
[subs="verbatim,quotes"]
57+
[subs="verbatim,quotes,macros"]
5858
----
5959
*Input:* "LVIII"
6060
*Output:* 58
@@ -64,7 +64,7 @@ Given a roman numeral, convert it to an integer. Input is guaranteed to be withi
6464

6565
*Example 5:*
6666

67-
[subs="verbatim,quotes"]
67+
[subs="verbatim,quotes,macros"]
6868
----
6969
*Input:* "MCMXCIV"
7070
*Output:* 1994

docs/0014-longest-common-prefix.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ If there is no common prefix, return an empty string `""`.
88

99
*Example 1:*
1010

11-
[subs="verbatim,quotes"]
11+
[subs="verbatim,quotes,macros"]
1212
----
1313
*Input:* ["flower","flow","flight"]
1414
*Output:* "fl"
1515
----
1616

1717
*Example 2:*
1818

19-
[subs="verbatim,quotes"]
19+
[subs="verbatim,quotes,macros"]
2020
----
2121
*Input:* ["dog","racecar","car"]
2222
*Output:* ""

0 commit comments

Comments
 (0)