1. Add the building util of Python

for the markdown docs.
2. Update the deploy.sh
This commit is contained in:
krahets
2023-02-06 23:23:21 +08:00
parent 64f251f933
commit ea901af217
28 changed files with 292 additions and 933 deletions
+1 -11
View File
@@ -63,17 +63,7 @@ comments: true
=== "Python"
```python title="insertion_sort.py"
""" 插入排序 """
def insertion_sort(nums):
# 外循环:base = nums[1], nums[2], ..., nums[n-1]
for i in range(1, len(nums)):
base = nums[i]
j = i - 1
# 内循环:将 base 插入到左边的正确位置
while j >= 0 and nums[j] > base:
nums[j + 1] = nums[j] # 1. 将 nums[j] 向右移动一位
j -= 1
nums[j + 1] = base # 2. 将 base 赋值到正确位置
[class]{}-[func]{insertion_sort}
```
=== "Go"