Skip to content

Commit 264b870

Browse files
committed
add source to note
1 parent 1bf54b3 commit 264b870

File tree

1,342 files changed

+10638
-6
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,342 files changed

+10638
-6
lines changed

docs/0001-two-sum.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ Because nums[*0*] + nums[*1*] = 2 + 7 = 9,
1515
return [*0*, *1*].
1616
----
1717

18+
19+
[[src-0001]]
20+
[source,{java_source_attr}]
21+
----
22+
include::{sourcedir}/_0001_TwoSum.java[]
23+
----
24+

docs/0002-add-two-numbers.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ You may assume the two numbers do not contain any leading zero, except the numbe
1414
*Explanation:* 342 + 465 = 807.
1515
----
1616

17+
18+
[[src-0002]]
19+
[source,{java_source_attr}]
20+
----
21+
include::{sourcedir}/_0002_AddTwoNumbers.java[]
22+
----
23+

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ Given a string, find the length of the *longest substring* without repeating cha
3333
----
3434

3535

36-
36+
[[src-0003]]
37+
[source,{java_source_attr}]
38+
----
39+
include::{sourcedir}/_0003_LongestSubstringWithoutRepeatingCharacters.java[]
40+
----
3741

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ nums2 = [3, 4]
2626
The median is (2 + 3)/2 = 2.5
2727
----
2828

29+
30+
[[src-0004]]
31+
[source,{java_source_attr}]
32+
----
33+
include::{sourcedir}/_0004_MedianOfTwoSortedArrays.java[]
34+
----
35+

docs/0005-longest-palindromic-substring.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ Given a string *s*, find the longest palindromic substring in *s*. You may assum
3737
* https://blog.csdn.net/dyx404514/article/details/42061017[Manacher算法总结_ddyyxx的程序员之路-CSDN博客]
3838
* https://www.jianshu.com/p/6db44081a155[Manacher算法详解 - 简书]
3939

40+
41+
[[src-0005]]
42+
[source,{java_source_attr}]
43+
----
44+
include::{sourcedir}/_0005_LongestPalindromicSubstring.java[]
45+
----
46+

docs/0006-zigzag-conversion.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,10 @@ Y A H R
4141
P I
4242
----
4343

44+
45+
[[src-0006]]
46+
[source,{java_source_attr}]
47+
----
48+
include::{sourcedir}/_0006_ZigZagConversion.java[]
49+
----
50+

docs/0007-reverse-integer.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ Given a 32-bit signed integer, reverse digits of an integer.
2929

3030
Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [-2^31^, 2^31^- 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows.
3131

32+
33+
[[src-0007]]
34+
[source,{java_source_attr}]
35+
----
36+
include::{sourcedir}/_0007_ReverseInteger.java[]
37+
----
38+

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,10 @@ If no valid conversion could be performed, a zero value is returned.
6060
Thefore INT_MIN (-2^31^) is returned.
6161
----
6262

63+
64+
[[src-0008]]
65+
[source,{java_source_attr}]
66+
----
67+
include::{sourcedir}/_0008_StringToIntegerAtoi.java[]
68+
----
69+

docs/0009-palindrome-number.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ Determine whether an integer is a palindrome. An integer is a palindrome when it
3131

3232
Coud you solve it without converting the integer to a string?
3333

34+
35+
[[src-0009]]
36+
[source,{java_source_attr}]
37+
----
38+
include::{sourcedir}/_0009_PalindromeNumber.java[]
39+
----
40+

docs/0010-regular-expression-matching.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,10 @@ p = "mis*is*p*."
7373
*Output:* false
7474
----
7575

76+
77+
[[src-0010]]
78+
[source,{java_source_attr}]
79+
----
80+
include::{sourcedir}/_0010_RegularExpressionMatching.java[]
81+
----
82+

0 commit comments

Comments
 (0)