mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-01 17:53:18 +08:00
Update Python codes.
This commit is contained in:
@@ -8,11 +8,10 @@ import sys, os.path as osp
|
||||
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
|
||||
from include import *
|
||||
|
||||
"""
|
||||
合并左子数组和右子数组
|
||||
左子数组区间 [left, mid]
|
||||
右子数组区间 [mid + 1, right]
|
||||
"""
|
||||
|
||||
""" 合并左子数组和右子数组 """
|
||||
# 左子数组区间 [left, mid]
|
||||
# 右子数组区间 [mid + 1, right]
|
||||
def merge(nums, left, mid, right):
|
||||
# 初始化辅助数组 借助 copy模块
|
||||
tmp = nums[left:right + 1]
|
||||
|
||||
Reference in New Issue
Block a user