归并排序 Python and C++
#!/usr/bin/env python # -*- coding: utf-8 -*- import random #归并排序 mergeSort # merge : 合并两个有序数组 def merge(left, right): result = [] while left and right: if left[0] <= right[0]: result.append(left.pop(0)) else: result.append(right.pop(0)) while l
下载地址
用户评论