Skip to content

Commit 496d812

Browse files
committed
[Code Formatter & Update Leaderboard] by 🤖
1 parent aff622f commit 496d812

File tree

19 files changed

+53
-25
lines changed

19 files changed

+53
-25
lines changed

.idea/dictionaries/yuzhouwan.xml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Codes/BlitheLou/LeetCode/001_two_sum.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。
77
88
示例:
9-
给定 nums = [2, 7, 11, 15], target = 9
10-
因为 nums[0] + nums[1] = 2 + 7 = 9
11-
所以返回 [0, 1]
9+
给定 nums = [2, 7, 11, 15], target = 9
10+
因为 nums[0] + nums[1] = 2 + 7 = 9
11+
所以返回 [0, 1]
1212
1313
来源:力扣(LeetCode)
1414
链接:https://leetcode-cn.com/problems/two-sum
1515
"""
16+
1617
"""
1718
方式一:
1819
两层循环分别遍历 nums,在内层循环内,判断两数和是否为 target。

Codes/BlitheLou/LeetCode/002_add_two_numbers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
来源:力扣(LeetCode)
1515
链接:https://leetcode-cn.com/problems/add-two-numbers
1616
"""
17+
1718
"""
1819
方式一:
1920
由于 输入:(2 -> 4 -> 3) 表示整数 342.

Codes/BlitheLou/LeetCode/other_code/206_reverse_linked_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
输入: 1->2->3->4->5->NULL
66
输出: 5->4->3->2->1->NULL
77
"""
8+
89
"""
910
想法:
1011
很容易想到,可以遍历单链表,依次取节点值,再以头插法放到另一个新链表中。

Codes/GinRyan/LeetCode/Python-3-Solves/1_sum_to_target.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
因为 nums[0] + nums[1] = 2 + 7 = 9
1111
所以返回 [0, 1]
1212
"""
13+
1314
"""
1415
解题思考1:
1516

Codes/GinRyan/LeetCode/Python-3-Solves/3_longest_substring_without_repeating_characters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
示例 1:
55
66
输入: "abcabcbb"
7-
输出: 3
7+
输出: 3
88
解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。
99
1010
示例 2:

Codes/GinRyan/LeetCode/Python-3-Solves/5_longest_palindromic_substring.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
输出: "bb"
1414
1515
"""
16+
1617
"""
1718
题解:
1819
本题可以用一种中央扩散法, 最差情况O(N^2)
@@ -46,7 +47,11 @@ def longestPalindrome(self, s: str) -> str:
4647
print("--可用最大邻域: " + str(naborspace + 1))
4748
for n in range(naborspace + 1):
4849
print(
49-
"--邻域内比对: 第" + str(n + 1) + "个邻域值,共" + str(naborspace + 1) + "个"
50+
"--邻域内比对: 第"
51+
+ str(n + 1)
52+
+ "个邻域值,共"
53+
+ str(naborspace + 1)
54+
+ "个"
5055
)
5156
if left >= 0 and right < total:
5257
sLeft = s[left]

Codes/GinRyan/LeetCode/Python-3-Solves/8_string_to_integer_atoi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
4545
输入: "-91283472332"
4646
输出: -2147483648
47-
解释: 数字 "-91283472332" 超过 32 位有符号整数范围。
47+
解释: 数字 "-91283472332" 超过 32 位有符号整数范围。
4848
因此返回 INT_MIN (−2^31) 。
4949
5050
来源:力扣(LeetCode)

Codes/GinRyan/LeetCode/Python-3-Solves/9_palindrome_number.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
2323
你能不将整数转为字符串来解决这个问题吗?
2424
"""
25+
2526
"""
2627
解题思路:
2728

Codes/gracekoo/47_permutations-ii.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ def backtrack(nums, num):
1212
output_list.append(num)
1313
return
1414
for i in range(len(nums)):
15-
if i > 0 and nums[i] == nums[i - 1]: # 每当进入新的构成,先考虑该构成的首字符是否和上一个一样。
15+
if (
16+
i > 0 and nums[i] == nums[i - 1]
17+
): # 每当进入新的构成,先考虑该构成的首字符是否和上一个一样。
1618
continue
1719
backtrack(nums[:i] + nums[i + 1 :], num + [nums[i]])
1820

0 commit comments

Comments
 (0)