代码如下:
# -*- coding: utf-8 -*-
from random import randintfrom math import ceil, floor
def _partition(a, l, r, i): “””以a[i]为主元划分数组a[l..r],使得: a[l..m-1]
A programmer’s note boke for work and life
代码如下:
# -*- coding: utf-8 -*-
from random import randintfrom math import ceil, floor
def _partition(a, l, r, i): “””以a[i]为主元划分数组a[l..r],使得: a[l..m-1]